CRF (constant rate factor)
CRF (constant rate factor) is a video encoding setting that targets a consistent perceived quality level rather than a fixed bitrate. Busy, fast-moving scenes get more data under CRF, while still or simple shots get less. Lower CRF values mean higher quality and bigger files. CRF is common in x264, x265 and FFmpeg workflows.
Why it matters
CRF lets a video business encode thousands of uploads at steady visual quality without tuning each file, which saves engineering time. Without a cap, though, file sizes and bitrates swing widely with content, which can surprise storage budgets and cause buffering on slow networks. Storage on FastPix is priced per minute of video per month, so a busy clip costs the same to keep as a calm one of equal length and resolution, whatever its file size.
How it works
- You pick a CRF value, where lower numbers mean higher quality and bigger files.
- The encoder looks at each frame's complexity and motion.
- It spends more bits on busy scenes and fewer on simple ones to keep perceived quality steady.
- Optionally, a maximum bitrate and buffer size cap the peaks so the stream stays deliverable.
What is a good CRF value?
For x264, a CRF between 18 and 28 is the usual range, with 23 as the default. Around 18 looks close to the source, and higher values save space at visible cost. For x265 the default is 28. A change of 6 roughly halves or doubles file size.
CRF vs bitrate: which should I use?
Use CRF when you care about consistent quality and file size can vary, such as archiving or on-demand libraries. Use a target bitrate when you need predictable sizes or bandwidth, such as live streams or adaptive bitrate ladders. Many services combine them by using CRF with a maximum bitrate cap.
Where it's used
Video platforms and short video apps use CRF to encode large volumes of uploads at steady quality without tuning each file. OTT services often add a bitrate cap to keep streams predictable.
By the numbers
- x264 and x265 accept CRF values from 0 to 51, with defaults of 23 for x264 and 28 for x265. (CRF Guide (Constant Rate Factor in x264, x265 and libvpx))
- A CRF change of 6 should result in about half or double the file size, though results vary. (CRF Guide (Constant Rate Factor in x264, x265 and libvpx))


