Question / Help Question about Buffer Size

th3w1zard1

New Member
I've been doing a lot of research the past few days, but I haven't found anything really answering my question about buffer size.

I realize the default is to keep the buffer size the same as the max bitrate, and I know that the buffer size fills during times of lag and used so that it helps the stream keep the desired quality and not drop frames and whatever.

My question is, does it matter how big your buffer size is? If you were to say set your buffer size to 10x your bitrate, how would that affect stream quality? What exactly is the downside of increasing it past your bitrate.

Sorry if this is a simple question, or if I'm asking in the wrong forum. I'm just not getting it, because if the only downside is that it increases the game-to-twitch delay (which I also read about), then I'm all for putting it at the max.

Along with this question, do the cbr buffer size and the vbv buffer size work in the exact same way? (for example if I have CBR enabled and put buffer size at 0, does it use the maximum buffer size that it can just like if it was using the VBV buffer size?)

Thanks for any and all insight

EDIT: after more research it looks like the buffer size also determines your bitrate, so is it just bitrate + buffer size? or how does that work?
 
Last edited:

eldiablo

Member
New
good luck getting any "under the hood" answers out of the OBS Higher Ups.
Perhaps I am not searching or digging deep enough, but nobody can explain certain areas of OBS.
Such as,
"What is 'minimize network impact' and how does it work?"
"What is 'automatic low latency mode' and how does it work?"

I have been around the obsforums for a while now, and anytime these kinds of questions are brought up, the OBS "Suits" reply with
"If you have issues with default settings, check "X" and test again."
-oh, what does ''X'' do?
"That is of none of your concern. Go Back to sleep citizen."

Anyway, I am hoping someone will post and prove me wrong.

*puts on tin foil helmet*
 

Sapiens

Forum Moderator
@eldiablo Please tone down the entitlement! The OBS "suits" are just people. This is an open source project, created, maintained and supported by volunteers. It isn't a job and we don't always have all the answers. In some cases the best reply to a new user asking about customizing an advanced setting is "don't touch that." If you think we aren't providing enough information when we reply to more in-depth topics like x264 behavior we welcome you to contribute such information to a thread if you can do so accurately.

@th3w1zard1 The VBV buffer does not "fill during times of lag" or do anything to prevent dropped frames. It's part of the rate control system used in x264 and you can read more information about it at http://forum.doom9.org/showthread.php?p=1624943#post1624943

The downsides of increasing vbv-bufsize are increased stream delay (dependant on the buffer size) and typically greater bandwidth fluctuation. Benefits to increasing the buffer size come mainly when encoding variable bitrate video and that's covered in the forum post I linked, but VBR is unsuitable for live streaming so it's not something that needs to be changed by most users.
 

Videophile

Elgato
New
good luck getting any "under the hood" answers out of the OBS Higher Ups.
Perhaps I am not searching or digging deep enough, but nobody can explain certain areas of OBS.
Such as,
"What is 'minimize network impact' and how does it work?"
"What is 'automatic low latency mode' and how does it work?"

I have been around the obsforums for a while now, and anytime these kinds of questions are brought up, the OBS "Suits" reply with
"If you have issues with default settings, check "X" and test again."
-oh, what does ''X'' do?
"That is of none of your concern. Go Back to sleep citizen."

Anyway, I am hoping someone will post and prove me wrong.

*puts on tin foil helmet*
This was totally unnecessary and did not help the conversation what so ever.
 

th3w1zard1

New Member
Thanks a lot for your replies. It's rare for me to post on forums asking for help, because I usually want an answer immediately, meaning I google for hours until I find what I'm looking for.

I think I checked those links you guys sent me before I made this thread. It doesn't quite explain the difference between CBR buffer size and VBV buffer size, because if enabling CBR buffer size causes spikes and bandwidth fluctuation, then isn't that exactly what VBV buffer size does, but also attempts to control the fluctuations better when the buffer size is set above the bitrate.

Sorry if I'm being unclear, I see why I was having trouble finding a solution on google now that I'm having trouble wording it.

EDIT: Should I be asking this on the doom9 forum instead, since that seems to have more in-depth questions/answers?
 
Last edited:

dodgepong

Administrator
Community Helper
You're getting confused between VBV and VBR. VBV is short for "Video Buffering Verifier", and is the strategy that h.264 uses to make sure that all the data is transmitted in a reasonable size for the destination device to be able to decode and play. VBR is "Variable Bit Rate", as opposed to CBR, which is "Constant Bit Rate". Both VBR and CBR utilize VBV as a strategy for transmitting a reasonable amount of data at a reasonable rate (see here).

The difference between CBR and VBR is that CBR attempts to fill the buffer at a constant rate, while VBR only fills the buffer as much or as little as it needs (on the encoder side). With VBR, you might have stretches of time where the buffer gets filled slowly or quickly, depending on the amount of motion in the scene. This causes the bandwidth demand to swing wildly, which makes it not ideal for streaming. With CBR, the encoder will pad the buffer with a bit of "excess data" (CBR padding) to make the buffer fill at a more constant rate. Yes, this means the file size is bigger and the amount of data transmitted is greater, but since the buffer is filling at a more steady rate, it's transmitting over the internet at a more steady rate as well, which is a lot easier for viewers to watch.
 

Boildown

Active Member
I think (and someone correct me if I'm wrong), with VBR, there is no buffer size. It uses as much buffer as it thinks it needs with no upper limit, but tries to average itself to the bitrate you set. CBR puts constraints on the size of the buffer that VBR doesn't have. So putting a CBR buffer size of 10x the bitrate would be similar to being VBR.

This may be wrong, but its my understanding. Willing to find a more correct understanding if one is available.
 

dodgepong

Administrator
Community Helper
I think (and someone correct me if I'm wrong), with VBR, there is no buffer size. It uses as much buffer as it thinks it needs with no upper limit, but tries to average itself to the bitrate you set. CBR puts constraints on the size of the buffer that VBR doesn't have. So putting a CBR buffer size of 10x the bitrate would be similar to being VBR.

This may be wrong, but its my understanding. Willing to find a more correct understanding if one is available.
This is wrong. VBR still uses a buffer. The scenario you're describing is what happens when you set the buffer size to 0, which then tells the encoder to use an infinitely-sized buffer, and thus use as much data as you want whenever you want. This is really only suitable for recordings that are going to be played back on a computer, which compared to devices like DVD players, have gratuitous amount of RAM available for the decoding buffer.
 

th3w1zard1

New Member
You're getting confused between VBV and VBR.

Yep that was a typo on my part, because I definitely meant VBR. Thank you, you answered my question perfectly.

By the way, since I have this open and I'm getting replies, is there a reason why setting the buffer size while using NVENC encoding does absolutely nothing?
 

Boildown

Active Member
This is wrong. VBR still uses a buffer. The scenario you're describing is what happens when you set the buffer size to 0, which then tells the encoder to use an infinitely-sized buffer, and thus use as much data as you want whenever you want. This is really only suitable for recordings that are going to be played back on a computer, which compared to devices like DVD players, they have gratuitous amount of RAM available for the decoding buffer.

Interesting. I thought setting the buffer to 0 was activating VBR mode. So setting the CBR buffer to 0 is activating infinite buffer for CBR and is not the same as VBR.

I guess I was confusing variable buffer... rates(?) with variable bit rates.
 

Boildown

Active Member
By the way, since I have this open and I'm getting replies, is there a reason why setting the buffer size while using NVENC encoding does absolutely nothing?

Not sure, the NVEnc encoder isn't nearly so well documented, nor has it been around as long. I guess it ignores that setting, if what you say is true? If so, then it probably is hard-wired into one configuration or the other.
 
Top