🍋
Menu
Best Practice Beginner 2 min read 311 words

Video Encoding Settings for Maximum Quality at Minimum File Size

Encoding settings dramatically affect video quality and file size. Learn how bitrate, CRF, preset, and keyframe interval interact to produce optimal results.

Key Takeaways

  • Video encoding balances three factors: quality, file size, and encoding speed.
  • ### CRF (Constant Rate Factor) CRF is the most important quality setting.
  • This is essential for meeting target file sizes or bitrate caps.

Key Encoding Parameters

Video encoding balances three factors: quality, file size, and encoding speed. Understanding how each parameter affects these factors lets you make informed tradeoffs for your specific use case.

CRF (Constant Rate Factor)

CRF is the most important quality setting. It targets a constant perceptual quality level, adjusting bitrate dynamically — allocating more bits to complex scenes and fewer to static ones. For H.264, CRF 18 is visually lossless, 23 is the default, and 28 produces noticeable artifacts. For H.265/HEVC, subtract 4-6 from these values (CRF 17-19 is equivalent quality).

Preset Speed Tradeoff

Encoding presets (ultrafast to veryslow) control how hard the encoder works to compress efficiently. Slower presets produce smaller files at the same quality but take longer. "medium" is the default; "slow" offers meaningfully better compression with roughly 2x encoding time; "veryslow" gives diminishing returns. For batch processing, "slow" is usually the sweet spot.

Keyframe Interval

Keyframes (I-frames) are complete frames; between them, only differences are encoded. Shorter intervals (every 1-2 seconds) enable faster seeking but increase file size. Longer intervals (4-10 seconds) produce smaller files but make seeking slower. For streaming, use a keyframe interval matching your segment duration (typically 2 seconds).

Audio Settings

Audio is often overlooked but affects total file size. AAC at 128-192 kbps is sufficient for most video content. For music-heavy content, use 256 kbps. Opus codec provides better quality at lower bitrates if your target platforms support it. For stereo content, downmixing from surround saves significant space.

Two-Pass Encoding

Two-pass encoding analyzes the entire video first, then encodes with optimal bitrate allocation. This is essential for meeting target file sizes or bitrate caps. The first pass is fast (analysis only); the second pass does the actual encoding. Use two-pass when you need to fit a specific file size, such as for email or messaging platforms.

Verwandte Tools

Verwandte Formate

Verwandte Anleitungen