Use CRF when quality matters most and the exact file size doesn't. Use two-pass bitrate when the file has to land on a specific size or average bitrate. At the same final file size, a well-run two-pass encode and a CRF encode from the same encoder look very similar. The real difference is what you fix in advance: CRF fixes the quality, and two-pass fixes the size.
That simple rule hides a few subtleties, such as capped CRF, single-pass bitrate modes and hardware encoders. This guide explains how each mode works, compares them side by side, and suggests the right choice for common jobs.
How CRF works
Constant Rate Factor tells the encoder to hold a consistent perceived quality. Simple scenes get few bits and complex scenes get many. You choose a quality number, for example CRF 20 in x264, and the bitrate falls wherever the content puts it. It needs only one pass, so it is fast and simple. It is also predictable in quality but not in size. Our guide to what CRF is covers the scales and sensible values.
How two-pass bitrate works
Two-pass encoding runs the encoder twice:
- Pass 1 analyses the whole video and writes a statistics log recording how complex each part is. No usable video is produced.
- Pass 2 uses that log to spread your fixed bit budget across the video as efficiently as possible: more bits for hard scenes, fewer for easy ones, while hitting the average bitrate you asked for.
Because the encoder knows the whole video before it commits any bits, the final size usually lands very close to the target. Container overhead and audio account for most of any difference. In FFmpeg:
ffmpeg -y -i input.mp4 -c:v libx264 -b:v 4000k -preset slow -pass 1 -an -f null NUL
ffmpeg -i input.mp4 -c:v libx264 -b:v 4000k -preset slow -pass 2 -c:a aac -b:a 128k output.mp4
On Windows the null output is NUL. On macOS and Linux use /dev/null. Use the same video settings in both passes.
Why they look the same at the same size
CRF and two-pass ABR in x264 and x265 use the same underlying tools for distributing bits: lookahead, macroblock-tree or CU-tree, and adaptive quantisation. If you encode with CRF, note the resulting bitrate, and then run a two-pass encode at exactly that bitrate, the two files are typically very close in quality. Two-pass does not add quality. It adds size control.
So a two-pass encode at a low bitrate will look worse than CRF 20 if CRF 20 would have used more bits. Likewise, a two-pass encode with a generous bitrate wastes space on simple content that CRF would have compressed harder.
Side-by-side comparison
| CRF / constant quality | Two-pass average bitrate | |
|---|---|---|
| You set | A quality level | An average bitrate (and therefore a size) |
| File size | Unknown until finished | Close to target |
| Quality | Consistent across different videos | Varies with content complexity |
| Encoding time | One pass | Two passes; the first pass is usually quicker than the second |
| Best for | Archives, personal libraries, uploads to sites that re-encode, general use | Size caps, fixed-capacity media, bitrate specs |
| Weak spot | Can't promise a size | Wastes bits on easy content, starves hard content at low budgets |
The other bitrate modes
Single-pass ABR
Setting -b:v without -pass gives single-pass average bitrate. The encoder has to guess how to spend bits without seeing what comes next, so quality distribution is worse than two-pass and the size is less precise. It is rarely the best choice for files. Use two-pass or CRF instead.
CBR
Constant bitrate keeps the data rate nearly flat, padding easy scenes and squeezing hard ones. That is inefficient for files but necessary for live streaming and some broadcast workflows, where the network or a downstream system needs a steady rate.
Capped CRF
Capped CRF is often the best of both worlds. You keep CRF's quality targeting but limit the peaks with a VBV buffer:
ffmpeg -i input.mp4 -c:v libx264 -crf 21 -maxrate 6M -bufsize 12M -c:a aac output.mp4
Easy content still gets fewer bits, and hard scenes can't exceed the cap. Many streaming and adaptive-bitrate setups use this, because players get a known worst-case bitrate without wasting bits on simple scenes. It still doesn't guarantee a total size, though.
Which mode for which job
| Job | Recommended mode |
|---|---|
| Shrinking your own video library | CRF with a slow preset |
| Uploading to YouTube or another site that re-encodes | CRF at a high-quality value, or a generous bitrate per the platform's guidance |
| Must fit under a size limit (chat apps, email, forms) | Two-pass at a calculated bitrate |
| Fixed-capacity disc or a client's bitrate spec | Two-pass |
| Streaming to many devices | Capped CRF or constrained VBR |
| Live streaming | CBR |
| Archival or editing master | Low CRF, or a lossless or intermediate codec |
For size-capped delivery, our target file size bitrate calculator shows how to work out the bitrate. For size-capped sharing, see compressing video for email or Discord.
Hardware encoders
GPU encoders (NVENC, Quick Sync, AMD) don't use the x264-style two-pass with a stats file. NVENC offers a -multipass option that runs an extra analysis pass within a single encode to improve bit distribution. Their constant-quality modes (-cq on NVENC, -global_quality on Quick Sync) are the closest equivalent to CRF. If you need an exact size from a GPU encoder, use VBR with a target and max bitrate, and expect the result to be a little less precise than a software two-pass. Our NVENC vs x264 guide covers the trade-offs.
Common mistakes
- Using two-pass "for quality". If there is no size requirement, CRF gives you the same efficiency in half the encoding time.
- Different settings in each pass. The pass 1 log describes the exact encode you described. Change the preset, resolution or filters between passes and the bit distribution will be wrong.
- Forgetting audio in the budget. The target size covers video and audio. Subtract the audio bitrate before you choose the video bitrate.
- Comparing CRF numbers across codecs. CRF 23 means different quality in x264, x265 and AV1.
Doing it with Movie Encoder
Movie Encoder supports CRF and constant quality, hardware CQ, CBR, VBR, average bitrate, two-pass and target file size, along with max bitrate and buffer settings for capped CRF. You choose the mode, and the command preview shows the exact FFmpeg arguments for each pass.
If you aren't sure which mode fits, the Smart Encoding Advisor recommends settings for goals such as Best quality, Smallest file or Streaming, with reasons and an expected file-size range. The Quality Lab lets you compare real test encodes by size, PSNR, SSIM and VMAF before you commit.
Frequently asked questions
Is two-pass better quality than CRF?
Not at the same file size. With the same encoder and settings the results are typically very close, so two-pass is mainly useful when you need to hit a specific size or bitrate.
Why does two-pass take longer?
The encoder runs over the whole video twice, first to analyse it and then to encode it. The first pass is usually quicker than the second, but the total time is still longer than a single CRF pass.
What is capped CRF?
Capped CRF combines a CRF quality target with a maximum bitrate and buffer size. It keeps the efficiency of CRF while limiting bitrate peaks, which is useful for streaming.
