Log in

View Full Version : Setting CBR or ABR modes in x264 CLI


Magno
24th February 2006, 16:25
Hi everybody!

I would like to know how to configure x264 CLI to get Constant Bitrate encodes and the same for Average Bitrate encodes. I always use --bitrate 500 --qpmin 1 --qpmax 51 --qpstep 50 --ratetol 0.6 and I suspect that I am getting ABR encodes, not CBR.
Am I wrong? How could I set CBR mode?

Before somebody gets angry with me, I have searched the forums but I didn't get any answer which made me clear how to set both options in x264 through CLI. XD

Thank you all!

Doom9
24th February 2006, 16:35
-b = abr
for cbr, there's no such mode so you have to help with ratetol (and perhaps some others). A search will yield the answer since I distinctively recall having read this queston and the answer before.

DarkZell666
24th February 2006, 19:32
--qcomp 0 will provide you plain CBR. --qpmin 1 is a good idea (but QP=1 is unlikely to happen really ^^)

Someone once reported having to tweak the VBV settings but that was for internet streaming, and since you are looking for CBR I guess you want to do the same thing. I'm clueless about VBV though, I'll pass my turn :p (using search you might even find the thread I'm talking about ^^)

Sharktooth
25th February 2006, 09:48
pengvado is working on strict VBV compliancy.
it will help to produce real CBR streams.

ShaneL
3rd March 2006, 03:50
I hope this will help with bitrate spikes. When encoding an HD source using the HQ-Slowest profile @5000kbps (720p), I get bitrate spikes of up to 20000kbps which totally kills audio sync.

foxyshadis
3rd March 2006, 04:36
If that's the case, perhaps you should lower qcomp (quant compression; 0=cbr & 1=cq, in theory) and ratetol (bitrate variance; 2-pass only), or play with vbv-maxrate and vbv-bufsize. All of those can help keep the bitrate from fluctuating too high to decode properly.

akupenguin
3rd March 2006, 05:28
ratetol (bitrate variance; 2-pass only)
ratetol is for 1pass too. and it affects bitrate spikes only in 1pass.

foxyshadis
3rd March 2006, 05:39
Oops, I added that because I noticed megui disabled it, but now I see it's only disabled in crf and not abr mode.

ShaneL
4th March 2006, 06:06
I'm doing a couple passes with lowering qcomp values right now. First one at .4 should be done tonight. I'll let you know how it turns out.

Also, aren't the VBV values just for buffers? I found that the VBV-Maxrate has a max setting of 9999 but I can playback around 11000kbps smoothly. I have not tried a pass with those values set, but that will be the next thing I will try.

Thanks,
Shane