Question / Help Maxbitrate, quality, and crf

Bensam123

Member
How do all of the above interact with each other? I've been messing around with CRF off and on, but I'm still unsure of how it's affected by bitrate. Does CRF simply override the maxbitrate and quality settings?
 

XeiZ

Member
CRF (not to confuse with CFR) and quality balance are the exact same. Quality balance of 10 is equal to a CRF of 22.
Lower Quality Balance would equal a HIGHER CRF. So if you set CRF=18, it would equal Quality Balance 13 (you also will be able to see that in the logfiles) and 24 would be 9 (not sure on this one actually, but you get the idea i guess).

Also CRF doesnt OVERRIDE the bitrate and before i write too much about this: http://homepage.univie.ac.at/werner.robitza/crf.html
^ this is a good read in combination with the mewiki.

So higher quality balances / lower crfs are only really worth it for higher bitrates, thats also why lower quality balance is recommended for FPS games or else it messes up the quality on high motion.
If you would increase the Bitrate by A LOT, you could probably maintain a clean picture with quality balance 10 even with high movement.

Quote from that page:
"Different bitrates correspond to different compression rate factors with different sources. So 1500kbps will be enough to get an RF of 15 with one source, but only an RF of 20 with another, dirtier source. When you use CRF or CQP you’re saying “use whatever bitrate is necessary to preserve this much detail.” It’s not a 1-to-1 thing."

note that this is probably not writen by someone who lifestreams games.
 

Bensam123

Member
I read the mewiki page, but still was unsure of how crf interacted with bitrate. If crf is just another setting for quality that makes sense. I also saw that crf changes the quality in log files, but still was uncertain if there was a direct relationship.

What I was confused on is this: "When you use CRF or CQP you’re saying “use whatever bitrate is necessary to preserve this much detail.”"

The mewiki talks about it in a similar way, so I assumed CRF overides bitrate in favor of maintaining a certain quality level.
 

XeiZ

Member
Well since the bitrate is variable to a certain extend it most likely will make the bitrate go higher than the maxbitrate you set, thats true, it still is limited by it. If you would set OBS to 1000/1000 it wouldnt go above 2000kbps and if you set your CRF to 22 / quality 10 and start playing stuff like battlefield, those 2000kbps would never be enough for that CRF but the chance that it will spike up a lot higher than 1000kbps would also be higher. Thats why lower CRF values work better for higher bitrates and CRF=0 would work fine with a local recording if you´d set the bitrate to something really really high or even to 0 so its not limited at all, obviously this would only work if your pc can handle it.
 

Bensam123

Member
Bitrate of 0 doesn't work from what I've seen. I tried doing that with a CRF of like 16 so that the CRF option would be the only thing controlling the bit rate.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Honestly, my observation of the matter is to simply start at 10 quality, then if you get pixellation with motion, turn it down, try again, and keep doing so until it feels like it looks right. Other than that I don't actually know the internals/math behind it.
 

Bensam123

Member
I wasn't necessarily looking for recommendations, rather just trying to figure out how they interact with eachother. I'm messing around with this for a lan encoding setting, where I want a baseline level of quality for the stream going to my server. Bandwidth really doesn't matter, but if it fluctuates over 15Mbps too much AMS disconnects the client.
 

Krazy

Town drunk
Well my understanding is that the maxbitrate is the max average bitrate the encoder tries to use over a period of time, while Quality Balance(aka CRF) is more how all the bits are assigned per scene, aka high motion vs low motion.
 

Grimio

Member
CRF has it's limit's when a vbv-buffer is specified, but set the buffer to 0 and it will ignore all bitrate limits and put out as much bitrate as it needs for the specified CRF value. That's the result I got from my testing.
 

XeiZ

Member
Grimio said:
CRF has it's limit's when a vbv-buffer is specified, but set the buffer to 0 and it will ignore all bitrate limits and put out as much bitrate as it needs for the specified CRF value. That's the result I got from my testing.

That actually makes sense. I take that a buffer set to 0 equals unlimited buffer? That would mean CRF can use whatever bitrate it needs, yea really makes sense even though its obviously not good for lifestreaming.
 
Top