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.53k stars 8k forks source link

Encoder overload and lag when using B Frames on RX 6700XT #7064

Closed deepakkajla closed 2 years ago

deepakkajla commented 2 years ago

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

28.0.0-beta2

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/c7K6O82Z0Bg7xLR5

OBS Studio Crash Log URL

No response

Expected Behavior

Adrenalin 22.8.1 fresh installed with DDU in safe mode. Followed the tutorial by EposVox to enable B fames in OBS (https://www.youtube.com/watch?v=DXL8_Adbob4) Since, B frame input is available in UI now I just used the command line argument: HighMotionQualityBoostEnable=1 Started 1440p60 stream to youtube expecting some improved quality

Current Behavior

Starting the stream shows stats as 98% frames skipped due to encoding lag Setting B frames to 0 works fine (0% skipped) Same experience in Beta 1 with command line arguments: MaxNumRefFrames=4 BReferenceEnable=1 BPicturesPattern=1 MaxConsecutiveBPictures=1 HighMotionQualityBoostEnable=1

Steps to Reproduce

  1. Youtube stream: 1440p60
  2. Set any non zero value of B frame (1 in my case)
  3. Start stream

Anything else we should know?

No response

flaeri commented 2 years ago

Could you try downgrading to 22.5.1? Please try without anything in the custom options box.

If it's still lagging, try to reduce the "quality" to balanced, or even speed.

deepakkajla commented 2 years ago

Could you try downgrading to 22.5.1? Please try without anything in the custom options box.

If it's still lagging, try to reduce the "quality" to balanced, or even speed.

Downgraded to 22.5.1 with DDU. Same issue, removed custom commands, dropped quality to balanced and speed. That only resulted in 50% and 25% skipped frames due to encoding lag respectively.

At 1080p60, balanced preset is fine, high still goes into encoding lag.

lextra2 commented 2 years ago

For higher then 1080p you'd want to use h265 anyways.

deepakkajla commented 2 years ago

For higher then 1080p you'd want to use h265 anyways.

Just trying to figure out why I can't recreate the settings by EposVox. Resolution is hardly the issue here, enabling B frames and quality settings are making the encoder overload at both 1080p60 and 1440p60

lextra2 commented 2 years ago

For higher then 1080p you'd want to use h265 anyways.

Just trying to figure out why I can't recreate the settings by EposVox. Resolution is hardly the issue here, enabling B frames and quality settings are making the encoder overload at both 1080p60 and 1440p60

Yup. I got that.

gutko commented 2 years ago

did you try 2 bframes instead of 1? read somwhere 3 causes problems, so maybe also 1 as odd number, just a loose guess

deepakkajla commented 2 years ago

did you try 2 bframes instead of 1? read somwhere 3 causes problems, so maybe also 1 as odd number, just a loose guess

Yeah, any non zero b frame input causes encoder lag.

Log for 1 b-frame: https://obsproject.com/logs/i9aOFwPrBabwtx01 Log for 2 b-frame: https://obsproject.com/logs/ytilm6qloPwJJku4 Log for 3 b-frame: https://obsproject.com/logs/bFPNJ9teaJbD8lW0

cs9kc commented 2 years ago

Yeah, any non zero b frame input causes encoder lag.

@deepakkajla The commit for the fix is here: https://github.com/obsproject/obs-studio/commit/07df6548fdb88e093eb0901106a882ad73ad9848

Once OBS Studio v28 releases, give 3 B-frames another try and see how it looks.

RytoEX commented 2 years ago

Fixed by https://github.com/obsproject/obs-studio/commit/07df6548fdb88e093eb0901106a882ad73ad9848

If the issue is not fixed, please comment, and we can reopen.

flyleaf1988 commented 2 years ago

OBS Studio v28 Release | 22.8.2 Radeon Driver | AMD RX 6800

Encoder overload on all settings besides b-frame disabled, tested 1, 2, 3 & 4. 1440p 60 FPS (YT Streaming)

cs9kc commented 2 years ago

@flyleaf1988 What exact options are you using in the encoder settings, both in the GUI and in the text entry field?

flyleaf1988 commented 2 years ago

@flyleaf1988 What exact options are you using in the encoder settings, both in the GUI and in the text entry field?

grafik

cs9kc commented 2 years ago

@flyleaf1988 Input "2" in the Keyframe Interval section and let me know how it behaves, please.

flaeri commented 2 years ago

Instead of troubleshooting on a closed issue, could we instead perhaps do this in the support channels on the discord? https://obsproject.com/discord

If you do not want to use discord or prefer the forums, you could do that instead: https://obsproject.com/forum/list/windows-support.32/

flyleaf1988 commented 2 years ago

@flyleaf1988 Input "2" in the Keyframe Interval section and let me know how it behaves, please.

Same thing with all B-Frame Settings.

Instead of troubleshooting on a closed issue, could we instead perhaps do this in the support channels on the discord? https://obsproject.com/discord

If you do not want to use discord or prefer the forums, you could do that instead: https://obsproject.com/forum/list/windows-support.32/

Sure, will report in Discord tomorrow.

lextra2 commented 2 years ago

For 1440p and higher, use HLS with hevc on YouTube...