[x264-devel] Making sense out of x264 rate control methods
darkshikari at gmail.com
Thu Feb 18 04:53:06 CET 2010
> ABR Mode
> - Tries to keep the encoded media around the desired bitrate. No
> - To enable in x264 simply set bitrate parameter.
> - qp_min, qp_max and qp_step can be used to control the
> quality of ABR mode?
> - qp, ipratio and pbratio are ignored in ABR mode?
> - Good for generating the first pass log file that can be used for
> subsequent VBR or CBR second passes.
> x264 --bitrate 1500 -o <output> <input>
ipratio applies to all modes. pbratio applies to all modes whenever
MB-tree is disabled.
> VBR Mode
> - By running ABR mode two or more passes we automatically get VBR
> - Does a better job at keeping the media around the desired bitrate
> than ABR but takes longer encoding time
> - Good for generating second and subsequent log pass files. Run as
> many times as desired but after 3 passes quality improvements are
> x264 --pass 1 --bitrate 1500 -o <output> <input> # ABR Mode
> x264 --pass 2 --bitrate 1500 -o <output> <input> # VBR Mode
This is called 2-pass mode, not VBR mode. ABR is a form of VBR. CRF
is also a form of VBR. In fact, anything not CBR is a form of VBR.
After 2 passes the quality change is negligable, not 3.
It doesn't necessarily take a longer time, since you can use faster
settings to compensate (and may still get better results than 1-pass
ABR). In general, never use ABR mode, ever.
> CBR Mode
> - By running ABR mode and setting vbv_maxrate equal to bitrate we get
> CBR mode.
> - The hard limit in maxrate can cause high degradation in quality.
> Only use if you really need to limit the bitrate below a certain
> - Not useful to generate first pass log files.
> x264 --vbv-bufsize 2000 --bitrate 1000 -o <output> <input>
CBR is perfectly useful to generate first pass log files for a 2-pass
CBR encode. 2-pass generally doesn't help much with CBR though and
can sometimes hurt.
> For single pass encodings I should use use CQP, ABR, CBR, CRF or Lossless.
No, you shouldn't use ABR ever.
> - ABR if you care about bitrate (e.g. streaming)
ABR is useless for streaming. For streaming, the best option is
capped CRF (CRF + VBV) or CBR.
> - CRF if you care about quality and bitrate/size is irrelevant.
No, CRF if you care about quality and you don't need a _specific
average bitrate_. You can still cap the local bitrate using VBV.
More information about the x264-devel