Convertio.com

Two-Pass Encoding vs CRF: Which Is Better for Video?

Two approaches to video quality control: CRF says "give me this quality level at whatever file size" while two-pass says "fit the best quality into this file size." This guide explains how each works and when to choose one over the other.

Convert MKV to MP4

CRF quality encoding applied automatically

MKV MP4

Tap to choose your file

or

Supports M4A, WAV, FLAC, OGG, AAC, WMA, AIFF, OPUS • Max 100 MB

The Fundamental Difference

CRF and two-pass encoding solve the same problem — balancing quality against file size — but from opposite directions:

  • CRF (Constant Rate Factor): "I want this quality level. Give me whatever file size is needed to achieve it." You control quality; file size is the variable.
  • Two-pass: "I want this file size (target bitrate). Give me the best quality that fits." You control file size; quality is the variable.
Feature CRF Two-Pass
You control Quality level (CRF number) Target bitrate / file size
Variable File size Quality
Passes 1 (single pass) 2 (analyze + encode)
Speed 1x (baseline) ~2x slower
File size prediction Unpredictable Predictable
Quality consistency Constant quality per frame Optimal bit distribution

How CRF Works

CRF encoding is a single-pass process. The encoder processes each frame and asks: "How many bits do I need to achieve this quality level for this specific frame?"

  • High-complexity frames (explosions, fast motion) receive more bits
  • Low-complexity frames (static shots, title cards) receive fewer bits
  • The quality stays constant; the bitrate fluctuates

The result is a variable bitrate (VBR) file where every frame gets exactly the bits it needs — no waste on simple scenes, no starvation on complex ones. This is why CRF produces the optimal quality-to-size ratio for offline encoding.

How Two-Pass Works

Two-pass encoding processes the video twice:

  1. Pass 1 (Analysis): The encoder scans the entire video without producing output. It builds a frame-by-frame complexity map — which scenes are simple, which are complex, where scene changes occur.
  2. Pass 2 (Encoding): Using the analysis from pass 1, the encoder distributes the target bitrate optimally across all frames. Complex scenes get more of the bitrate budget; simple scenes get less.

The result: a file that precisely hits the target bitrate while distributing quality as evenly as possible across all scenes.

Quality Comparison

At sensible settings, CRF and two-pass produce nearly identical quality. The differences are subtle:

  • CRF advantage: Every frame gets exactly the bits it needs. No frame is ever starved. CRF may produce slightly better average quality because it's not constrained by a bitrate budget.
  • Two-pass advantage: Better bit distribution for extreme content (long videos with wildly varying complexity). The analysis pass helps the encoder prepare for upcoming complex scenes.

In practice, the quality difference between CRF and a well-targeted two-pass encode is negligible for most content. You would need frame-by-frame VMAF analysis to detect differences.

Speed Comparison

The speed difference is straightforward:

  • CRF: 1x encoding time (single pass through the video)
  • Two-pass: ~1.7–2x encoding time (first pass is fast since it doesn't produce output, but still takes time)

For a 10-minute 1080p video on a modern CPU:

  • CRF medium: ~20 seconds
  • Two-pass medium: ~35 seconds

When to Use CRF

CRF is the better choice for almost all common scenarios:

  • File conversion: MKV to MP4, MOV to MP4, any format conversion where you want the best quality
  • Personal archival: Storing your video library at consistent quality
  • Web upload: YouTube, social media, and most platforms accept variable bitrate files
  • Sharing: When file size doesn't need to be exact, CRF gives optimal quality
  • Batch processing: One setting (CRF 23) works well for all content types

This is why our converter uses CRF — it produces the best quality without requiring users to calculate target bitrates.

When to Use Two-Pass

Two-pass encoding is the better choice when file size must be predictable:

  • DVD/Blu-ray authoring: Content must fit on a specific disc capacity
  • Bandwidth-constrained streaming: Adaptive bitrate streaming (HLS/DASH) requires precise bitrate targets for each quality level
  • File size limits: Platforms with strict upload limits (Discord 25 MB, email 25 MB) where you need to guarantee the output fits
  • Professional broadcast: Broadcast pipelines often require CBR or precise VBR targets

The Best of Both: Capped CRF

There is a hybrid approach called capped CRF (constrained quality) that combines the advantages of both methods:

ffmpeg -i input.mkv -c:v libx264 -crf 23 -maxrate 4000k -bufsize 8000k -c:a aac output.mp4

This tells the encoder: "Target CRF 23 quality, but never exceed 4 Mbps." In practice:

  • Simple scenes: encoded at CRF 23 quality (well below 4 Mbps)
  • Complex scenes: encoded at CRF 23 quality unless it would exceed 4 Mbps, in which case quality is slightly reduced to stay within the cap

Capped CRF is ideal for streaming applications where you need bandwidth predictability without sacrificing CRF's quality-first approach.

Ready to Convert?

Convert with CRF quality encoding for optimal results

MKV MP4

Tap to choose your file

or

Supports M4A, WAV, FLAC, OGG, AAC, WMA, AIFF, OPUS • Max 100 MB

Frequently Asked Questions

Not necessarily. Both produce similar quality at reasonable bitrates. CRF is faster (one pass) and produces optimal quality per bit. Two-pass is only better when you need a specific file size. For most users, CRF is the recommended approach.

YouTube suggests two-pass for consistent bitrate, which helps their processing pipeline handle uploads more predictably. For most users uploading to YouTube, CRF produces equivalent or better results with less effort — YouTube re-encodes everything anyway.

CRF. It produces the best quality without requiring users to guess at bitrate targets. CRF automatically allocates bits where they're needed most, resulting in optimal quality for any content type.

Yes, this is called "capped CRF" or constrained quality. Add -maxrate and -bufsize flags to your FFmpeg command. It targets CRF quality but never exceeds the specified maximum bitrate. Useful for streaming where bandwidth is limited.

More MKV to MP4 Guides

MKV vs MP4: Which Container Should You Choose?
MKV vs MP4 compared: codec support, subtitle tracks, device compatibility, and when to use each container format.
H.264 vs H.265 (HEVC): Which Video Codec Is Better?
H.264 vs H.265 codec comparison: quality, file size, encoding speed, hardware support, and compatibility.
MKV to MP4 Without Losing Quality: Complete Guide
Convert MKV to MP4 losslessly via remuxing or with minimal quality loss. CRF settings and codec compatibility explained.
Container vs Codec: What's the Difference?
Understand the difference between video containers (MKV, MP4, AVI) and codecs (H.264, H.265, VP9). Essential knowledge for video conversion.
CRF Quality Guide: H.264 & H.265 Settings Explained
Master CRF (Constant Rate Factor) settings for H.264 and H.265. Quality vs file size tradeoffs with visual examples.
FFmpeg Presets: Speed vs Quality vs File Size
FFmpeg encoding presets from ultrafast to veryslow. Benchmark data showing quality and speed tradeoffs for each preset.
Frame Rate Guide: 24 vs 30 vs 60 FPS Explained
Video frame rates explained: 24 fps for film, 30 fps for TV, 60 fps for gaming. When to change FPS during conversion.
Pixel Format YUV420p: Why It Matters for Video Compatibility
Why yuv420p is required for universal video playback. Chroma subsampling, color depth, and compatibility with every device.
MKV Subtitles: How to Handle Multiple Tracks
Handle MKV subtitle tracks during conversion: extract SRT, burn-in SSA/ASS, and preserve subtitle data when converting to MP4.
Back to MKV to MP4 Converter