Skip to content

Latest commit

 

History

History
85 lines (61 loc) · 4.14 KB

File metadata and controls

85 lines (61 loc) · 4.14 KB
layout nav_order title has_children
default
4
Codec Comparisons
true

Codec Comparisons

Table of contents {: .text-delta } 1. TOC {:toc}

Ffmpeg supports over 100 video codecs, but only a fraction of those are really worth a deeper dive.

We are going to focus on codecs that match one of the following conditions:

  • Supported by common web browsers.
  • Have good compression ratios with good color fidelity.
  • Supported by common apps, e.g. Resolve, RV, AVID.
  • Commonly requested as a delivery format by studios or clients.

Codecs reviewed

Codec Family ffmpeg codec Bit depth Pixel format supported Web Support HDR
h264 x264 8 10 YUV-4:4:4 yuv-4:2:2 YUV-4:2:0 All Browsers HLG
VP9 libvpx-vp9 8 10 12 yuv-4:2:0 yuv-4:2:2 yuv-4:4:4 rgb rgb-10 rgb-12 All Browsers Yes
HEVC/H265 libx265 8 10 12 yuv-4:2:0 yuv-4:2:2 yuv-4:4:4 rgb rgb-10 rgb-12 All browsers Yes
HEVC/H265 hevc_videotoolbox 8 10 yuv-4:2:0 yuv-4:2:2 yuv-4:4:4 rgb rgb-10 rgb-12 All browsers Yes
AV1 libsvtav1 8 10 yuv-4:2:0 Chrome Firefox Edge Yes
Prores prores_ks 10 yuv-4:4:4:4 yuv-4:4:4 yuv-4:2:2 Safari ?
DNxHD dnxhd 8 10 yuv-4:2:2 yuv-4:4:4 rgb no ?
Mjpeg mjpeg 8 yuv-4:2:2 yuv-4:4:4 no no
OpenAPV liboapv 10 12 yuv-4:4:4:4 yuv-4:4:4 yuv-4:2:2 no yes

For a high level comparison we have encoded 4 sets of media using our recommended settings, all with the aim of getting the VMAF score > 98. libx264 libstvav1 and vp9 were all encoded 4:2:0 and DNxHD and Prores were at 10-bit 4:2:2.

For details on codec flags, and how we picked the parameters, do goto the page for each codec.

| Comparing encoding time for codecs applied to different media. | | Comparing filesize for codecs applied to different media. | | Comparing VMAF score for codecs applied to different media. | | Comparing PSNR-Y harmonic mean for codecs applied to different media.|

Uncompressed containers

Y4m is a terrific container for uncompressed media. It allows uncompressed raw YCrCb data to be stored with a simple header.

Uncompressed Codecs.

Ffmpeg has support for a small number of uncompressed codecs that are worth using for testing. We don't recommend any of them for day-to-day use.

| Codec | Description | Pix Fmt | Notes | |:----------|:-----------|:-----------|:-----------|:-----------|:-----------| | v410 | 444 10-bit | yuv444p10le | | | v408 | 4444 8-bit with alpha | yuva444p | Quicktime compatible | | v308 | 444 8-bit packed | yuv444p | | v210 | 422 10-bit | yuv422p10le | | | r210 | RGB 10-bit | | png | PNG inside a Quicktime, either 8 or 16-bit with or without alpha | rgb24 rgba rgb48be rgba64be pal8 gray ya8 gray16be ya16be monob |

Other codecs worth considering.

Below are other codecs that may be worth considering at some point.

| Codec | Profile description | Pix Fmt | Notes | |:----------|:-----------|:-----------|:-----------|:-----------|:-----------| | hap | HAP and HAPQ codec | rgba | HAP - Fast GPU decompression, at the expense of file-size | | LCEVC | | | Low Complexity Enhancement Video Coding |

See:

See Also