Xaymar/obs-StreamFX

AMD AMF H.264/AVC (via FFmpeg) wrong readings in log #476

Benman2785 posted onGitHub

Description

with everything set to default there will be some errors in log:

13:15:41.625: [StreamFX] [h264_amf] Initializing... 13:15:41.625: [StreamFX] [h264_amf] FFmpeg: 13:15:41.625: [StreamFX] [h264_amf] Custom Settings: 13:15:41.625: [StreamFX] [h264_amf] Standard Compliance: Strict 13:15:41.625: [StreamFX] [h264_amf] Threading: Slice & Frame (with 1 threads) 13:15:41.625: [StreamFX] [h264_amf] Video: 13:15:41.625: [StreamFX] [h264_amf] Texture: 1600x900 nv12 BT.709 tv 13:15:41.625: [StreamFX] [h264_amf] Framerate: 60/1 (60.000000 FPS) 13:15:41.625: [StreamFX] [h264_amf] Keyframes: 13:15:41.625: [StreamFX] [h264_amf] Distance: 120 frames 13:15:41.625: [StreamFX] [h264_amf] AMD AMF: 13:15:41.625: [StreamFX] [h264_amf] Usage: log_to_dbg <Default> 13:15:41.625: [StreamFX] [h264_amf] Preset: log_to_dbg 13:15:41.625: [StreamFX] [h264_amf] Rate Control: me_quarter_pel 13:15:41.625: [StreamFX] [h264_amf] Look-Ahead: Disabled <Default> 13:15:41.625: [StreamFX] [h264_amf] Frame Skipping: Disabled <Default> 13:15:41.625: [StreamFX] [h264_amf] Filler Data: Enabled 13:15:41.625: [StreamFX] [h264_amf] Bitrate: 13:15:41.625: [StreamFX] [h264_amf] Target: 6000000 bits/sec 13:15:41.625: [StreamFX] [h264_amf] Maximum: 0 bits/sec <Default> 13:15:41.625: [StreamFX] [h264_amf] Buffer: 12000000 bits 13:15:41.625: [StreamFX] [h264_amf] Quantization Parameters: 13:15:41.625: [StreamFX] [h264_amf] I-Frame: -1 <Default> 13:15:41.625: [StreamFX] [h264_amf] P-Frame: -1 <Default> 13:15:41.625: [StreamFX] [h264_amf] Other: 13:15:41.625: [StreamFX] [h264_amf] Reference Frames: -1 Frames 13:15:41.625: [StreamFX] [h264_amf] Enforce HRD: Disabled <Default> 13:15:41.625: [StreamFX] [h264_amf] VBAQ: Disabled <Default> 13:15:41.625: [StreamFX] [h264_amf] Access Unit Delimiter: Disabled <Default> 13:15:41.625: [StreamFX] [h264_amf] Maximum Size: 0 <Default> 13:15:41.625: [StreamFX] [h264_amf] Half-Pel Motion Estimation: Enabled <Default> 13:15:41.625: [StreamFX] [h264_amf] Quarter-Pel Motion Estimation: Enabled <Default> 13:15:41.625: [StreamFX] [h264_amf] H.264/AVC: 13:15:41.625: [StreamFX] [h264_amf] Profile: high 13:15:41.625: [StreamFX] [h264_amf] Level: 4.2 13:15:41.648: ---------------------------------

especially i mean this: 13:15:41.625: [StreamFX] [h264_amf] Usage: log_to_dbg <Default> 13:15:41.625: [StreamFX] [h264_amf] Preset: log_to_dbg

it should be: 13:15:41.625: [StreamFX] [h264_amf] Usage: transcoding <Default> 13:15:41.625: [StreamFX] [h264_amf] Preset: balanced <Default> or 13:15:41.625: [StreamFX] [h264_amf] Preset: quality

if i manually set: -usage=3 -quality=2 in ffmpeg it shows correctly: timestamp: [StreamFX] [h264_amf] Usage: webcam timestamp: [StreamFX] [h264_amf] Preset: quality

if i manually set: -usage=0 -quality=2 in ffmpeg it shows partly correct: timestamp: [StreamFX] [h264_amf] Usage: log_to_dbg <Default> timestamp: [StreamFX] [h264_amf] Preset: quality

-log_to_dbg is afaik the logging parameter

System Information

  • Software Version: 0.10.0.0a2-g7829817f
  • Operating System: Win10
  • Kernel Version: 20H2
  • CPU: Ryzen 7 2700X
  • GPU: RX 580 4G
  • RAM: 32GB DDR4-3200CL14 (4x 8G)

These are expected and not bugs. The code to convert numbers back into strings does not work correctly on any encoder nor was it really meant to - just meant to replace even worse debugging code.

posted by Xaymar about 4 years ago

Did not mean to close this.

posted by Xaymar about 4 years ago

main problem is that when i set it manually in FFmpeg it shows correctly - so i assume there is an error somehow somewhere

posted by Benman2785 about 4 years ago

23:21:50.123: [StreamFX] [h264_amf] Custom Settings: -usage=2 -quality=2 -profile=100 -level=42 -rc=1 -preanalysis=true -coder=1 -qmin=25 -qmax=46 -me_half_pel=true -me_quarter_pel=true -vbaq=true -intra_refresh_mb=128 ... 23:21:50.123: [StreamFX] [h264_amf] Rate Control: me_quarter_pel

here again - it should say: 23:21:50.123: [StreamFX] [h264_amf] Rate Control: CBR

posted by Benman2785 about 4 years ago

Fix is now in the #662 PR.

posted by Xaymar over 3 years ago

Fund this Issue

$0.00
Funded

Pull requests