Question / Help A quick question about Custom Buffer Size

MrBayeasy

Member
Hey guys,

Was just wondering what quality benefits setting a custom buffer size could have, I have been trying to really optimize my OBS recently to achieve the best possible quality while still being viewable to most viewers as I am currently an unpartnered streamer. I am currently streaming between 4000-4500kbps at 1080p60, I could go up to 7000 but then I risk alienating some of my audience. I'm streaming on Mixer just in case that information matters or should come up as I know Twitch has a lower bandwidth limit.

I don't really have any bandwidth limitations and I've recently come across some evidence that settings a custom buffer size higher than what my baseline kbps is could achieve higher clarity and less artifacting. I'm just wondering if there is any truth to this or if the examples I've come across have been misrepresented/mislabeled in some way. If this is the case at what point could I be expected to see diminishing returns and what adverse affects would this have on the performance of my rig (as in is this option entirely bandwidth based, or is there some sort of additional CPU load that would come with using a custom setting?)

Thanks so much for your time, I appreciate any and all advice.
 

MrBayeasy

Member
Alright, another quick question if that's alright:

In regards to Keyframe interval, is it true that the higher the number the better the quality (clarity, less artifacting, etc), so for example a value of 2 would yield better quality than 1?

Next under the CPU Preset option, is a setting of "High" going to produce better visuals than either "Main/Baseline" (again clarity/reduction in artifacts). If this is true is the improvement in quality as follows:

Baseline= Worst Quality
Main= Normal Quality
High= Best Qualty

Thanks again for your time +)
 

Harold

Active Member
In regards to Keyframe interval, is it true that the higher the number the better the quality (clarity, less artifacting, etc), so for example a value of 2 would yield better quality than 1?
No. Higher keyframe intervals introduce longer delays in viewers being able to start watching your stream.

Next under the CPU Preset option, is a setting of "High" going to produce better visuals than either "Main/Baseline" (again clarity/reduction in artifacts). If this is true is the improvement in quality as follows:
That's not preset, that's profile, and you don't touch that. Having it at "High" alienates viewers.
 

BK-Morpheus

Active Member
If you set your resolution and/or framerate to a more reasonable setting, the stream quality will drastically increase (especially if the Stream has a lot of details that are moving).
1080p with 4000-6000kbps upload only makes sense, if the Game is not moving many pixels (like Hearthstone or League of Legends), and in combination with 30fps.

Going from 30 to 60fps will need a huge bump in bitrate, going from 720p to 1080p needs an even bigger jump.

In ARK (just as an example), there is so much going on (regarding moving details), that even 720p 60fps 5000kbit/s get's pretty pixelated, when I'm moving the character.
(even when I use x264 CPU preset slow). 720p 30fps looks much sharper and viewers don't benefit as much from high framerate as players.

If you do a test recording and check the footage it's normal to think "what the hell is this garbage low 30fps..I need to pump it up to 60fps". But that's mostly related to the experience from playing the game with high fps just a few minutes ago.

You could do two test recordings with the the same settings, except framerate. Record with 30fps, than with 60fps.
Wait a few hours (so don't play the game for a while) or sleep over it and than watch the 30fps video first. You might notice that 30fps isn't that bad. After then watching the smoother 60fps clip you might notice that it's much more blurry or pixelated in movement.
 
Last edited:

cristian44137

New Member
Thanks I was just wondering if either of those had an impact on quality, I appreciate your help! +)
(I think) it's a bit late, but... don't hear anything Harold said.

Basically, High profile is the norm, you don't want to go lower than that, only very old devices will have problems with High. Keyframes intervals (or GOP) are typically from 1 to 2 seconds, and they inherently depend on buffer size (which of course it isn't there for nothing), you want to set it at 1 if you want 2 seconds latency on your stream (and your wi-fi/ethernet connection can handle it), or 2 if you don't mind more latency and prefer more stability in terms of compression quality, if you go higher it will improve the quality as the data is given more time to be compressed, so it results in less artifacts, up to a point. The buffer size is, by default, set to match your bitrate, so if you have 9000 kbps it will be set to 9000 kb size if you didn't touch it. When the bitrate matches the buffer size it's called 1-second buffer size.

You can go lower, up to 400 milliseconds (0.4 seconds) buffer size (in this example it would be 3600 kb), but take in mind this would increase the number of HTTP requests of your streaming site, so the more amount of users watching you, the more likely is it to freeze for everyone (this depends solely on your streaming platform). I would experiment and go with 1/2 second buffer size (4500 kb in this case) and then 2/3 second, next 4/5.... until you don't notice any problem with it (but generally there isn't above 2/3 second), this will improve the latency.

And I said buffer size and Keyframe interval are linked, that's because the optimal is that your keyframe interval (which should be greater than the buffer size in seconds), is divisable by the buffer size and give you an integer number. So, 9000 kbps bitrate with 9000 kb buffer size would give you the following optimal options of keyframe: 1, 2, 3, 4, ... seconds. It's only a matter of matching it so every keyframe starts at the same time a buffer starts.

If you have a higher keyframe that your internet connection or streaming platform can handle, you will see buffering and the picture quality will decrease, but you will notice it gets fixed upon restart of the website. If you see that, you know the problem is that the keyframe is too low or that it isn't synced with the buffer size.

That's it, sorry for the long paragraph lol
 
Last edited:

Zolja007

New Member
(I think) it's a bit late, but... don't hear anything Harold said.

Basically, High profile is the norm, you don't want to go lower than that, only very old devices will have problems with High. Keyframes intervals (or GOP) are typically from 1 to 2 seconds, and they inherently depend on buffer size (which of course it isn't there for nothing), you want to set it at 1 if you want 2 seconds latency on your stream (and your wi-fi/ethernet connection can handle it), or 2 if you don't mind more latency and prefer more stability in terms of compression quality, if you go higher it will improve the quality as the data is given more time to be compressed, so it results in less artifacts, up to a point. The buffer size is, by default, set to match your bitrate, so if you have 9000 kbps it will be set to 9000 kb size if you didn't touch it. When the bitrate matches the buffer size it's called 1-second buffer size.

You can go lower, up to 400 milliseconds (0.4 seconds) buffer size (in this example it would be 3600 kb), but take in mind this would increase the number of HTTP requests of your streaming site, so the more amount of users watching you, the more likely is it to freeze for everyone (this depends solely on your streaming platform). I would experiment and go with 1/2 second buffer size (4500 kb in this case) and then 2/3 second, next 4/5.... until you don't notice any problem with it (but generally there isn't above 2/3 second), this will improve the latency.

And I said buffer size and Keyframe interval are linked, that's because the optimal is that your keyframe interval (which should be greater than the buffer size in seconds), is divisable by the buffer size and give you an integer number. So, 9000 kbps bitrate with 9000 kb buffer size would give you the following optimal options of keyframe: 1, 2, 3, 4, ... seconds. It's only a matter of matching it so every keyframe starts at the same time a buffer starts.

If you have a higher keyframe that your internet connection or streaming platform can handle, you will see buffering and the picture quality will decrease, but you will notice it gets fixed upon restart of the website. If you see that, you know the problem is that the keyframe is too low or that it isn't synced with the buffer size.

That's it, sorry for the long paragraph lol
So in theory, would having a Bitrate of 9mbps and a Custom Buffer Size of 18mbps make it so it becomes very stable? I'm trying to make it so it won't lag on the viewer side but I don't want to sacrifice the Quality of the stream. I've noticed here and there that I'll get more viewers when I'm streaming at lower bitrate, but then the quality goes down... So If I keep the Bitrate at 9k to get the max because that's all Facebook allows, and put the Buffer Size to 18k, that should virtually eliminate the buffering for viewers? Or am I getting that wrong? lol

x264
CBR
9k bitrate
18k Buffer size
2s Keyframe
CPU slow
Profile High
Tune Film

Im using a Mac Studio Ultra with the CPU and GPU Maxed.
 

cristian44137

New Member
Yes, you're correct, but you also have to count the bitrate dedicated to the audio track that you selected for the stream (which can be up to 320kb), and remove it from the 9000kb/s bitrate of the video so you can match the maximum bitrate allowed by Facebook. Otherwise, you could add the audio bitrate x2 to the buffer, but that wouldn't work in your case because of Facebook streaming limits.
 

cristian44137

New Member
If you have an M1, I would recommend you to upgrade to OBS 28 (You would have to check all your plugins are compatible and reinstall them as well), as they added better support for Apple silicon and you will benefit from less RAM/CPU usage and smooth streams, or so I heard.
 

Zolja007

New Member
If you have an M1, I would recommend you to upgrade to OBS 28 (You would have to check all your plugins are compatible and reinstall them as well), as they added better support for Apple silicon and you will benefit from less RAM/CPU usage and smooth streams, or so I heard.
I did, on Monday. And yeah my cpu is barely hitting 25% with my busiest scene on CPU slow. Once I hit very slow, It gives issues with the encoder. Thank you.
 
Top