Question / Help Setting a minrate and maxrate

AaronZ

Member
EDIT: I got CBR working I need to set max/min rates for CBR though.

Hello, I currently have my settings as follows:

32zl1d4.png


Everything looks fine and no dropped frames or lag, however I'm occassionaly getting the "Ok" status on YouTube while streaming (90% of the time it's Green/Good though). It pretty much depends on the game for example when it gets dark or there's not much movement, the bitrate goes down and goes under the YouTube recommendation for 480p which is 750kbps minimum.

Of course using CBR will fix the problem however when I use that I get a LOT of dropped frames, pretty much the video runs at 10fps, but when recording locally its smooth (same settings). I've tried lowering the bitrate incase it was my internet but it still did it.

So basically I'm wondering if there's a minrate command I can type in the x264 options box for CRF for when it goes below 800kbps for example? I tried "-minrate 800" like you would in ffmpeg but it didn't seem to do anything.

For the record my up speed is 1.5mbps.

Thanks.
 
Last edited:

AaronZ

Member
Unfortunately it seems to be my only choice hence why I want to set a minrate so I can try to replicate CBR.
 

Harold

Active Member
Dropped frames means it's an internet connection problem. You really should deal with that first.
 

AaronZ

Member
Even though CRF works absolutely fine (even when it spikes way above 1000kbps)? I guess I'll just stick with that if there's nothing else I can do, it holds up for the whole stream so I'm fine with it, just trying to stop it dropping too low is all. Thanks anyway.
 
Sounds like an internet issues, but might not be. Can you do a speedtest and screenshot a result?

Also, what are you running besides your stream when streaming? Anything that uses the internet? (e.g. if your game is an MMO)
 

AaronZ

Member
Actually I just solved it by setting a custom buffer size to 500 and no frame drops now. I've seen a lot of posts saying to set it to the same as the video bitrate or higher though so should I do that? I've only started streaming so this is kinda new to me (I've been using ffmpeg/x264 for years though so I'm sort of familiar).

Does buffer size add a delay to the video?
 
Okay, I did a quick bit of research on what the buffer actually is (cus I don't really know either).

Link 1 Link 2 Link 3

From what I understand it determines how much bits worth of stream the receiving end may queue up, the first link explains this pretty well. This is why using a buffer = your bitrate makes sense, cus you'll never buffer more than an entire second. This means that the bigger your buffer, the more your actual bitrate output will vary (for when the buffer fills faster/slower for a couple frames due to more/less movement), so using a small buffer makes the bitrate more consistent and your stream more stable. Usually both people's internet and streaming services are okay with a bit of variation. Maybe your internet connection is very particular about the bitrate, and doesn't handle spikes too well.
 
Last edited:

AaronZ

Member
Ok done a bunch of tests with plenty of movement and with no movement at all - no drops at all now. I still would like to set min/max rates however I don't know the values to put into x264 options. I want something like:

minrate=1000
maxrate=1200
 
I've tested it myself a bit, and it does look like a smaller buffer means a more "tight" bandwidth limit. That means up AND downwards, so using a small buffer is probably the closest you will get to a minrate. Aslong as CBR Padding is enabled (I think it's enabled by default in OBS MP) CBR will have a minrate of sorts in that it will "fill up" the bitrate even if it doesn't actually need to.

Oh, and you might like this.
 

AaronZ

Member
Ok will test a bit more with the buffer size. I also figured out how to set a maxrate thanks to mediainfo, it's:

vbv_maxrate=1200

and after a local recording, checking it in mediainfo reflects that. I also added vbv_minrate=1000 but I don't think that's a valid parimeter.

Anyway with these settings I'm getting decent quality with no drops. Thanks for your help. I'll check out the link anyway, see if I can improve stability.
 
Bottom left? I've never gotten any bitrate numbers in OBS MP so far, although it's a feature I'd much like to see, it was very handy in the old OBS. It's possible I just missed the setting for it, but I'm pretty sure I'd noticed something like that.
 
Last edited:

AaronZ

Member
Bottom right, sorry. It shows CPU usage, Bitrate, time and dropped frames (only shows time and CPU usage when recording locally).
 
It does indeed give a bitrate indicator when streaming. I'm sad this doesn't happen for recording though, as it's an important testing tool.
 

AaronZ

Member
Well that is weird. Here I'm using 0.11.4 and it's there when streaming:
141uo81.jpg


On a side note, is there a chance my audio bitrate varies? I have it set to 128kbps.
 
Last edited:

ThoNohT

Developer
According to some internet searching, aac does indeed have a variable bitrate, but this will probably not make too much of a difference, it will always average around the 128 +/- 10 kbps max.
 
Top