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
59.65k stars 7.9k forks source link

New AMD Encoder stutters and lags #7635

Open AleytiaFairlight opened 1 year ago

AleytiaFairlight commented 1 year ago

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

28.1.0-rc1

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/logs/r2acLKJxfgYOR3dw

OBS Studio Crash Log URL

No response

Expected Behavior

Upon streaming using the old Encoder stream is fine no stutter or lag using OBS 27.2.4 https://obsproject.com/logs/2PwvJ4VZmN6XFfTu

Current Behavior

however upon using the new encoder in any version of OBS 28 stream is laggy and stuttering. https://obsproject.com/logs/r2acLKJxfgYOR3dw

Steps to Reproduce

1.Strean using new encoder on any version of OBS 28 2. 3. ...

Anything else we should know?

Hardware specs image

lextra2 commented 1 year ago

Maybe try preset: speed on your potato. Otherwise stick to 720p. 1080p with 6K bitrate will look horrible anyways.

sandr1x commented 1 year ago

Specify the variable preanalysis=0 in the additional parameters. This will reduce the load on the encoder by 10%. I don't recommend sacrificing preset choice, choose quality. If the encoder is still overloaded, reduce the output resolution until the problem goes away. Usually it is 1664x936, 1600x900, 1536x864. This will significantly reduce the load on the encoder.

sandr1x commented 1 year ago

image Output resolution 1664x936 Radeon RX 570

lextra2 commented 1 year ago

image Output resolution 1664x936 Radeon RX 570

PreAnalysis defaults to 0 and VBAQ defaults to 1. Your parameters literally don't do anything. And using an arbitary resolution like 1664x936 will reduce quality on higher resolution displays because it isn't a power of 2. Also your gpu is much more powerful than the potato that OP uses.

You are clueless.

Fenrirthviti commented 1 year ago

You are clueless.

Please refrain from insulting other members of our community. We do not tolerate that kind of behavior.

sandr1x commented 1 year ago

PreAnalysis is set to zero by default, but forcibly disabling it reduces the load on the enoder by 10%. You can argue all you want, but it just works.

VBAQ default depends on usage. https://github.com/GPUOpen-LibrariesAndSDKs/AMF/blob/master/amf/public/include/components/VideoEncoderVCE.h For ffmpeg it is 0, and was always 0 until the last update

Reducing the output resolution greatly reduces the load on the encoder. It also allows you to save bitrate, which improves image quality, but sacrifices image clarity. This only works for twitch and is practiced by a huge number of streamers. 936p true resolution 16:9

You also recommend using the speed preset, which I never recommend doing. It's too much of a sacrifice.

The only thing, I agree with you, is that the user has little chance of getting acceptable quality due to the low efficiency and performance of the encoder.

You should show a little respect, and not give premature evaluations to users.

lextra2 commented 1 year ago

PreAnalysis is set to zero by default, but forcibly disabling it reduces the load on the enoder by 10%. You can argue all you want, but it just works.

Wrong. And preanalysis=0 isn't even a valid parameter. You'd have to use EnablePreAnalysis=false but since false is the default already there won't be any difference.

VBAQ default depends on usage

Wrong. It is enabled for both, AVC & HEVC

You also recommend using the speed preset, which I never recommend doing. It's too much of a sacrifice.

Yes. If he absolutely must use 1080p, with his weak hardware, it most likely only works with "speed". I recommended to use 720p because a bitrate of 6K is too low for 1080p anyways.

This only works for twitch and is practiced by a huge number of streamers. 936p true resolution 16:9

And they are all wrong in doing so. 1280x720 fits perfectly into 2560x1440 & 3840x2160 which results in a better image. Therefore it should be used over odd resolutions.

You should show a little respect, and not give premature evaluations to users

And you should research before recommending outdated or bad settings.

Fenrirthviti commented 1 year ago

Please keep this on-topic to the issue report itself, not arguing about settings. This is quickly turning in to a support problem, and the original issue is no longer clear if it's a bug or not.

@lextra2 Second warning to please tone down the hostility towards other community members.

lextra2 commented 1 year ago

and the original issue is no longer clear if it's a bug or not.

There is no bug in this issue. The hardware @ScarletDevil25 uses is simply too weak. And so I recommended settings that would work on their hardware. That is all.

AleytiaFairlight commented 1 year ago

and the original issue is no longer clear if it's a bug or not.

There is no bug in this issue. The hardware @ScarletDevil25 uses is simply too weak. And so I recommended settings that would work on their hardware. That is all.

I've refrained from replying to the thread as I felt that none of the replies have addressed the issue.

No the hardware is not too weak as you put it, if you look at the log when I'm using the older encoder with OBS 27.2.4 there is no encoder overload, nor does my stream lag or stutter. the issue only occurs when I use the new encoder.

Fenrirthviti commented 1 year ago

Completely agreed, and thank you for the patience.

Right now, we think we have an idea on why this has changed (and it doesn't have anything to do with hardware performance or settings), and we might have a possible workaround for it. Technical details aside, we'll post here when there's something to test.

AleytiaFairlight commented 1 year ago

any updates on this?

Fenrirthviti commented 1 year ago

You don't need to ask for updates, which sends an email to everyone subscribed to the repo. If we have anything to share, you can be sure we will share it here.

Fenrirthviti commented 1 year ago

There is a chance this is corrected in 29.1, can you please test again with the beta?