Question / Help Can't seem to provide a smooth stream.

Midmas

New Member
As the title states, I feel like I've never been able to really provide a smooth stream like i've seen others capable of, watching a major streamer or even a not so major streamer, I see that they are capable of streaming at a solid 1080p 60 fps or even higher and it looks great, it clearly looks like its a stable 60fps on their stream and that not a single frame is dropping. However, everytime I playback one of my own streams it never looks that great. I can see frames skipping every now and then.

I also can't even stream most modern games at 1080p 60 fps.

I have an i7 9700k at stock speeds for the moment, and an rtx 2080 ti

I feel like if any one should be able to stream at 1080p 60fps in a modern game, it should be me. Especially with the new Nvenc Encoding.

I keep running into issues though, With (New) Nvenc H.264 encoding I keep running into (Encoding Overload) Errors, even when at 720p 60fps, which seems outrageous considering my setup. While the resolution looks great with the new Nvenc Encoding, It refuses to stream at a stable 60fps. All the meanwhile, no matter what my OBS settings say, My own gameplay framerate is as smooth as butter. It's only OBS that seems to struggle to keep up with maintaining 60 frames.

I've been streaming for 3 years now, some games are worse than others and I've tried many settings over the years. I am just finally fed up and want to reach out and see what I could possibly be doing wrong. I absolutely feel like with a RTX 2080 TI and an i7 9700k I should be able to stream Resident Evil 2 at 1080p 60FPS and provide a smooth crisp stream for viewers. So why am I not able to achieve this? Are my expectations too high? is 1080p 60fps just impossible without a full computer dedicated to OBS and encoding? Or Am I doing something wrong with my Single CPU setup?






https://obsproject.com/logs/diYb4ZQC8-COZ0wB

This log above is from using the x264 encoding preset

This is about the absolute best I've ever been able to stream a a game, It's never been more smooth than in this clip. Which Saddens me. You can clearly see many frame skips and stutters in that small clip.

https://clips.twitch.tv/OpenDifficultDeerOpieOP


Ill post a video of me using the New Nvenc encoding as that the turing GPU's offer, the resolution and clarity look great with it, but the frames skip like mad and it often causes an encoding overload, and even when it isn't overloaded it still skips worse than this clip I've uploaded.
 

Narcogen

Active Member
1) Check that game mode is off.

00:31:12.074: base resolution: 2560x1440

Capturing at 1440p60 is a lot of load. While having canvas resolution be the same as native display resolution is best if you can do it, it may not be necessary depending on what you're running the game at. For instance if you're running the game at 1080p you can set this safely to 1080p, it will greatly reduce load.

00:36:51.240: [x264 encoder: 'streaming_h264'] preset: faster
00:36:51.240: [x264 encoder: 'streaming_h264'] settings:
00:36:51.240: rate_control: CBR
00:36:51.240: bitrate: 2500


Faster is not recommended. The default is veryfast. The quality difference between faster and veryfast costs a lot of CPU for a small improvement, and it would not be enough to compensate for the difference in bitrate between 6000 (the previous attempt in your log) and 2500. However you probably should be using NVENC at the highest bitrate your connection can stand anyway.

00:35:52.911: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 1302 (8.5%)
00:35:52.911: Video stopped, number of skipped frames due to encoding lag: 1311/15364 (8.5%)


You are overloading your GPU (the rendering lag line)

https://obsproject.com/wiki/GPU-overload-issues
 

Midmas

New Member
1) Check that game mode is off.

00:31:12.074: base resolution: 2560x1440

Capturing at 1440p60 is a lot of load. While having canvas resolution be the same as native display resolution is best if you can do it, it may not be necessary depending on what you're running the game at. For instance if you're running the game at 1080p you can set this safely to 1080p, it will greatly reduce load.

00:36:51.240: [x264 encoder: 'streaming_h264'] preset: faster
00:36:51.240: [x264 encoder: 'streaming_h264'] settings:
00:36:51.240: rate_control: CBR
00:36:51.240: bitrate: 2500


Faster is not recommended. The default is veryfast. The quality difference between faster and veryfast costs a lot of CPU for a small improvement, and it would not be enough to compensate for the difference in bitrate between 6000 (the previous attempt in your log) and 2500. However you probably should be using NVENC at the highest bitrate your connection can stand anyway.

00:35:52.911: Output 'adv_stream': Number of lagged frames due to rendering lag/stalls: 1302 (8.5%)
00:35:52.911: Video stopped, number of skipped frames due to encoding lag: 1311/15364 (8.5%)


You are overloading your GPU (the rendering lag line)

https://obsproject.com/wiki/GPU-overload-issues


Yeah, It auto switched the bitrate to 2500 when I switched Encoding, I normally use 6k Bitrate, I could go higher I suppose.

Because my main monitor is 1440p, I usually play games in 1440p and then downscale the output resolution to 1080p or 720p.

is it better to have my base resolution set to 1080 and my scaled resolution to 1080p even though I'm playing @ 1440p?

Or should I have my base resolution set to the resolution my main display is running and then my scaled resolution to 1080p?
 

Narcogen

Active Member
Your base resolution should be the size of your largest source. Ideally this is native resolution for the purposes of quality, but if having it set that way creates a performance bottleneck, you're sacrificing image fidelity for smoothness.

Scaling itself doesn't add a lot of load, but how much rendering OBS has to do depends on how large the canvas resolution is, so lowering it can help with that problem. Framerate affects it also, which is why many times streamers are advised to either attempt 720p60 or 1080p30 as output resolutions.
 

Carto

New Member
You need to limit your GPU usage, on single PC you can't rail the GPU for more than 90% without risking FPS drops. Cap your FPS and adjust in game settings until your GPU is below 90% usage. I'm a single PC streamer as well, and even with a 2080, 9900K and running the X264 encoder off of the CPU my stream FPS tanks if my GPU usage climbs above 90% as OBS itself will use the GPU to render its scenes, so if there isn't any GPU left for OBS, kiss your stream/recording FPS goodbye :)
 

Midmas

New Member
Well I genuinely Appreciate the Advice, Ill post again after doing some more testing with a few different games.
 

Agamemnus

Member
Hey there,

NVENC on your graphics card is definitely better than x264. Don't bother with x264. Proof is here: https://unrealaussies.com/tech/nvenc-x264-quicksync-qsv-vp9-av1/

Your CPU is great, and using NVENC it wont even stress. This is all encoding related, which leaves rendering.

NVENC is not part of the render / compositor process....

Your graphics card can draw an image on your screen, or more accurately, into memory, at a certain speed. If the game is at high enough graphics settings to max out your graphics card, you get the little skips you're seeing. OBS needs like 5%-10% of your GPU's rendering power to generate an image. It basically takes your game, scales it, puts the webcam on top, puts notifications on top (even if they're transparent most of the time) and then sends the final image to your encoder (NVENC is a different chip in your card and x264 is your CPU). If OBS has to compete with your game, then it will struggle to render the image, and fight with the game for every % of power it can get. This gives you stutter in the final product.

You need to limit your game to only 80% or so of your GPU. Usually, when you lower the graphics, the frame rate just goes up, so it's still maxing out your GPU. You need to stop this by capping the frame rate in-game.

Some games automatically don't use all your GPU, so they work fine. Some of them like Overwatch will cap at 300fps, so on Ultra settings you'll struggle since 100% GPU might get you only 220fps, but on low settings 80% GPU gets you 300fps so the game stops using more power. In these cases, you want to lower your graphics settings a little, and cap your frame rate so that you leave some of your GPU spare for OBS to draw your scene up in every frame.

Some games, like Apex Legends, currently just cap at your monitor's max rate (could be 144fps) or an arbitrary rate that the devs just put in there. You can't cap it. Many streamers struggle, because it means your game will always try to use 100% of your GPU. How to get around it? That depends. Some of them, enabling V-Sync will do it. It depends on the game.
 

shershen

Member
I don't understand, why game always win in fight for GPU? Years go by but we still cannot give OBS highest priority in terms of GPU usage, hardware becomes more and more powerful but we cannot finally leave these problems in the past and get finally smooth stream. Something is fundamentally wrong here...
 

Narcogen

Active Member
OBS cannot do it because there is no access to any OS feature that allows it to do so.

And the only feature Microsoft has introduced to Windows does the opposite of what OBS users want-- Game Mode is designed to let games win in the competition for GPU resources.
 

Agamemnus

Member
Narcogen is right. It's not that OBS can't use whatever you allocate it. It can. It's that you're telling the game to use it too. You're telling both programs to use the same resource. The way you tell the game NOT to use all the resource, is to cap it's frame rate. Windows does not allow you to tell one program to take the graphics card resources from another. It's just not in the OS as far as I know.
 
Top