CRF and RF: constant-quality rate control in practice
Constant-quality encoding removes the fixed bitrate and replaces it with a perceptual target. You choose the target; the encoder chooses how many bits each frame needs to reach it.
The idea is older than it looks. Classical rate control asked for a bitrate and then adapted quality to hit it, which meant simple scenes were over-spent and complex scenes were starved. Constant-quality control inverts the relationship. It holds the quantiser behaviour steady relative to a target and lets the bitrate float with content complexity, so a static interview and an action sequence are treated by the same perceptual rule rather than by the same bandwidth number.
What the number means
Constant Rate Factor in the x264 and x265 encoders is a logarithmic quality scale where lower values mean higher fidelity. RF, the analogous control in libaom and SVT-AV1, uses a comparable scale. The exact mapping from number to quantiser step differs per encoder and per codec, which is why a value of twenty in one codec is not a value of twenty in another. The scale is monotonic and roughly perceptually uniform, which makes it a practical dial, but it is not a cross-codec currency.
| Codec | Control | Visually transparent | General delivery | Small file |
|---|---|---|---|---|
| H.264 (x264) | crf | 16 to 18 | 20 to 23 | 26 to 30 |
| HEVC (x265) | crf | 18 to 20 | 21 to 24 | 27 to 31 |
| AV1 (SVT-AV1) | crf | 20 to 24 | 28 to 32 | 36 to 42 |
These ranges are starting points, not standards. Resolution changes the picture because artefacts scale with viewing distance. A CRF that looks clean at 1080p on a desktop monitor can look soft at 4K on a large panel, and the same value on a noisy phone capture spends a large share of its bitrate describing sensor grain rather than scene detail.
Reading a quality measurement
Objective metrics describe fidelity, not beauty. Peak signal-to-noise ratio is easy to compute and poorly correlated with perceived quality because it weights all errors equally. Structural similarity and its multi-scale variant weight structural degradation more than uniform error, which tracks viewer judgement better. Video multi-method assessment fusion combines several signals into a single score and correlates best across the tests we run, at the cost of a reference pass that roughly doubles processing time.
Building a defensible value
Start from a representative sample rather than a single scene. Encode the sample at three candidate values, then measure with a metric that correlates with perception and confirm the finding by eye on a calibrated display. Choose the lowest quality that survives both checks for the stated target, and record the decision with the source characteristics so a later reviewer can reproduce it. That record is what turns a preference into an engineering decision.
Constraints that interact with quality
Two-pass and single-pass modes change how the encoder distributes bits but not the target itself; single-pass constant quality is sufficient for on-demand work, while segment-aware two-pass helps very long or variable productions. Psychovisual tuning options redistribute bits toward regions the eye favours, which can lower the file size at a fixed score. Preset and speed settings trade search effort against quality at the same nominal target, so a value is only reproducible together with the preset that produced it.
Denoising before encoding is often the largest file-size lever available. Noise is expensive to code and contributes little to perceived content, and a light temporal denoise can reduce the bitrate substantially at a given quality target with minimal visible impact. The interaction between denoise strength and the chosen quality value is worth measuring rather than guessing, because over-denoising produces a plastic look that metrics reward but viewers notice.
Summary
Constant-quality control replaces a bandwidth target with a perceptual one. The number is a dial on a per-codec scale, meaningful only alongside the preset, the resolution and the source characteristics that produced it. Treat every published recommendation as a hypothesis to be tested on your own material, and record the test result so the next engineer inherits evidence rather than folklore.