CRF (Constant Rate Factor)

September 11, 2026
A quality target for the encoder, not a size target. Lower means better and bigger; the scale is inverted, and the right value depends on what you filmed.
crf
h264
encoding
quality

CRF is the setting you use when you care how the video looks and are willing to accept whatever file size that produces. You give the encoder a quality target and it spends as many bits per scene as that target needs — lots on a fast pan, few on a static frame.

The scale runs roughly 18 to 32 in practice and it is inverted: lower CRF means higher quality and a larger file. CRF 18 is not "18% quality".

The usual advice is "use 23". Our measured sweep says that advice is incomplete, because the same CRF lands in completely different places depending on the footage. On 1080p clips encoded with libx264 at preset medium, CRF 23 scored:

FootageVMAF at CRF 23Bitrate
Screen recording95.51,244 kbps
Animation93.35,970 kbps
Camera92.55,705 kbps

Push all three to CRF 32 and they separate much further: the screen recording still scores 89.9, while the camera footage collapses to 74.4. A single recommended number cannot serve both.

Worth knowing: CRF is the wrong tool when you have a hard ceiling to hit. It does not know what a megabyte is, so "CRF 23" and "under 20 MB" are unrelated requests, and hitting a cap by guessing at CRF values is a search. Use a target size for that, and CRF when size is negotiable.

See also