Skip to main content

Video Codecs

Frame supports a comprehensive range of video codecs for different use cases, from web streaming to professional archival. This guide covers each codec’s characteristics, use cases, and recommended settings.

Supported Codecs

H.264 / AVC

The most widely compatible video codec, supported on virtually every device and platform.Codec ID: libx264

Use Cases

  • General-purpose video conversion
  • Maximum device compatibility
  • Web streaming and social media
  • Live streaming
  • When file size efficiency matters more than cutting-edge compression

Preset Options

H.264 supports the full range of FFmpeg presets that control encoding speed vs compression efficiency:
  • ultrafast - Fastest encoding, largest files
  • superfast - Very fast encoding
  • veryfast - Fast encoding, good for real-time applications
  • faster - Faster than default
  • fast - Fast encoding
  • medium - Default - Balanced speed and compression
  • slow - Better compression, slower encoding
  • slower - Even better compression
  • veryslow - Best compression, very slow encoding

Quality vs Speed Tradeoffs

  • Fast presets (ultrafast-fast): Encode 2-10x faster but produce 10-30% larger files
  • Medium preset: Optimal balance for most use cases
  • Slow presets (slow-veryslow): Produce 5-15% smaller files but take significantly longer

Container Compatibility

Works with: MP4, MKV, MOV, AVI, WEBM

Example Configuration

{
  "videoCodec": "libx264",
  "preset": "medium",
  "videoBitrateMode": "crf",
  "crf": 23
}
H.264 is the best choice when maximum compatibility is required. Nearly every device manufactured in the last 15 years can decode H.264 hardware-accelerated.

When to Use Each Codec

Use H.264 (libx264)When you need the video to play on the widest range of devices, including:
  • Older smartphones and tablets
  • Smart TVs
  • Game consoles
  • Car entertainment systems
  • Any device manufactured before 2016
Recommended settings:
  • CRF: 23 (good quality)
  • Preset: medium
  • Container: MP4
Use H.265 (libx265)When you want to save storage space while maintaining high quality:
  • Large video libraries
  • 4K content archival
  • NAS/server storage
  • Personal media collections
Recommended settings:
  • CRF: 18-22 (excellent quality)
  • Preset: slow or slower
  • Container: MKV or MP4
Use VP9For web-based video delivery:
  • YouTube uploads
  • Website embedded video
  • Browser-based playback
  • Royalty-free requirements
Recommended settings:
  • CRF: 30-35
  • Preset: medium
  • Container: WebM
  • Audio: Opus
Use ProResFor video editing workflows:
  • Importing footage into editing software
  • Color grading intermediate files
  • VFX work
  • Multi-generation editing (minimize quality loss)
Note: Export to H.264/H.265 for final delivery.
Use AV1When you need the absolute smallest file size and have time:
  • Long-term archival with maximum space savings
  • Streaming platform requirements (YouTube, Netflix)
  • Batch overnight processing
  • Future-proofing content
Recommended settings:
  • CRF: 28-32
  • Be prepared for long encoding times
  • Container: WebM or MP4

Codec Comparison Table

CodecCompressionEncoding SpeedCompatibilityBest For
H.264GoodFastExcellentGeneral use, compatibility
H.265ExcellentSlowGood (2016+)Archival, 4K video
VP9ExcellentVery SlowGood (web)Web streaming, YouTube
AV1OutstandingExtremely SlowLimited (2021+)Maximum compression
ProResN/A (intra-frame)FastLimited (editing software)Professional editing

See Also

Build docs developers (and LLMs) love