Ratecontrol, in H.264/AVC parlance, means the application of a variety of methods to overall constrain the bitrate of content or consistency of perceptual quality across the entirety of the encode.

For users interested in a constant visual quality, crf (constant rate factor) should be utilized. The typical value for content to be perceived as visually lossless is near 18. Lower numbers will result in higher visual quality but larger file sizes.

The constant quantizer mode is not frequently used, and disables much of the adaptive perceptual features in AVC. It is available for solutions that require it.

The default, average bitrate control, utilizes larger and smaller bitrates over time to achieve an overall bitrate as close to the requested bitrate as possible. It is possible to add VBV parameters like vbv-maxrate and vbv-bufsize to precisely control the maximum bitrate over a given time duration, which can be useful when creating adaptive bitrate manifest-based content like HLS and DASH. Reach out to our support engineers for advice on choosing these parameters if you have a scenario requiring them.

ParameterDescriptionAllowed ValuesDefault Value
cqp Enable constant quantizer mode.Positive Integernone
crf Enable constant quality mode (also known as constant ratefactor).Floatnone
qmin Specify the minimum quantizer.Positive Integer10
qmax Specify the maximum quantizer.Positive Integer50
qdiff Specify the maximum QP step.Positive Integer4
bt Specify the allowed variance of average bitrate.Positive Integernone
i_qfactor Specify the qscale difference between I-frames and P-frames.Float0.71
b_qfactor Specify the qscale difference between P-frames and B-frames.Floatnone
chromaoffset Specify the QP difference between chroma and luma.Positive Integernone
pass Specify how many encoding passes.1, 2, 3none
rc_eq Specify the ratecontrol equation.StringblurCplx^(1-qComp)
qcomp Specify the QP curve compression: 0.0 => CBR, 1.0 => CQP.Float0.60
complexityblur Reduce fluctuations in QP (before curve compression).Float20.0
qblur Reduce fluctuations in QP (after curve compression).Float0.5
rc-lookaheadNumber of frames to use for mb-tree ratecontrol and vbv-lookaheadInteger number between 0 and 250none