obsproject / obs-studio

OBS Studio - Free and open source software for live streaming and screen recording
https://obsproject.com
GNU General Public License v2.0
60.67k stars 8.02k forks source link

B-frames not setting to 0 despite logging so #9628

Open prgmitchell opened 1 year ago

prgmitchell commented 1 year ago

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

29.1.3

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/8L3AQcoToTitkydX

OBS Studio Crash Log URL

No response

Expected Behavior

B-frames should be set to 0 when incompatible as the log implies.

Current Behavior

This is shown in the log

16:52:57.892: [jim-nvenc] Max B-frames setting (2) is more than encoder supports (0).
16:52:57.892: Setting B-frames to 0

But the output settings still show b-frames set to 2 and the encoder fails to start.

16:52:57.908: [FFmpeg NVENC encoder: 'simple_video_recording'] settings:
16:52:57.908:   encoder:      NVIDIA NVENC HEVC (FFmpeg)
16:52:57.908:   rate_control: CQP
16:52:57.908:   bitrate:      0
16:52:57.908:   cqp:          18
16:52:57.908:   keyint:       250
16:52:57.908:   preset:       p5
16:52:57.908:   tuning:       hq
16:52:57.908:   multipass:    qres
16:52:57.908:   profile:      main
16:52:57.908:   width:        852
16:52:57.908:   height:       480
16:52:57.908:   b-frames:     2
16:52:57.908:   psycho-aq:    1
16:52:57.908:   GPU:          0

The user reporting this was able to start their encoder after switching to advanced output mode and manually setting b-frames to 0.

Steps to Reproduce

  1. Start recording on simple output mode with this users hardware
  2. B-frames being set to 0 is logged but the encoder is still unable to start

Anything else we should know?

This is not my hardware, I am reporting on behalf of someone in the support discord.

RytoEX commented 1 year ago

Quadro K600 GPUs are Kepler cards and do not support Quarter Resolution multipass, so the encoder is trying to fall back from our internal implementation to the older FFmpeg implementation. Kepler cards support either no multipass (Single Pass) or Full Resolution multipass.

I suspect there is some weirdness here in this specific fallback path where the b-frame check occurs, but because of the fallback, the override value gets lost. That said, Kepler cards are pretty much EOL and unsupported (they are in security support until September 2024), and I don't have hardware to test this exact path, so I'm not sure if/when we'd fix this.