{
  "schemaVersion": 1,
  "contentVersion": "ca42e61ede0a24f789d7287a0001244ad22f4abf",
  "id": "docs/guides/choose-a-codec",
  "collection": "docs",
  "title": "Choose a codec and encoder",
  "description": "Practical codec, encoder and container recommendations for delivery, compatibility, editing and archival, with the compatibility limits that matter.",
  "canonicalUrl": "https://encode.wiki/guides/choose-a-codec/",
  "apiUrl": "https://encode.wiki/api/v1/documents/docs/guides/choose-a-codec.json",
  "markdownUrl": "https://encode.wiki/api/v1/markdown/docs/guides/choose-a-codec.md",
  "status": "current",
  "tags": [
    "workflow",
    "compatibility"
  ],
  "license": "CC BY-SA 4.0",
  "dates": {
    "lastVerified": "2026-10-08T00:00:00.000Z"
  },
  "authors": [],
  "sources": [
    {
      "title": "Android — supported media formats",
      "url": "https://developer.android.com/media/platform/supported-formats",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "Apple — M3 family announcement (AV1 hardware decode)",
      "url": "https://www.apple.com/newsroom/2023/10/apple-unveils-m3-m3-pro-and-m3-max-the-most-advanced-chips-for-a-personal-computer/",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "WebKit — features in Safari 17.0 (AV1 with hardware decoding)",
      "url": "https://webkit.org/blog/14445/webkit-features-in-safari-17-0/",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "AV1 Codec ISO Media File Format Binding",
      "url": "https://aomediacodec.github.io/av1-isobmff/",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "RFC 9043 — FFV1 Video Coding Format Versions 0, 1, and 3",
      "url": "https://www.rfc-editor.org/rfc/rfc9043",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "Xiph.org — Opus recommended settings",
      "url": "https://wiki.xiph.org/Opus_Recommended_Settings",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    }
  ],
  "headings": [
    {
      "depth": 2,
      "text": "Quick recommendations",
      "anchor": "quick-recommendations"
    },
    {
      "depth": 2,
      "text": "Video codecs",
      "anchor": "video-codecs"
    },
    {
      "depth": 2,
      "text": "Audio codecs",
      "anchor": "audio-codecs"
    },
    {
      "depth": 2,
      "text": "Lossless and archival video",
      "anchor": "lossless-and-archival-video"
    },
    {
      "depth": 2,
      "text": "Containers",
      "anchor": "containers"
    }
  ],
  "sections": [
    {
      "id": "_preamble",
      "title": "Page introduction",
      "depth": 0,
      "canonicalUrl": "https://encode.wiki/guides/choose-a-codec/",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/guides/choose-a-codec/_preamble.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/guides/choose-a-codec/_preamble.md",
      "checksum": "2e8a0935b602bf1c1d9c53eb750d1f93214aebe8167e0aa01a76fa8fb553fe4a",
      "bytes": 201
    },
    {
      "id": "quick-recommendations",
      "title": "Quick recommendations",
      "depth": 2,
      "anchor": "quick-recommendations",
      "canonicalUrl": "https://encode.wiki/guides/choose-a-codec/#quick-recommendations",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/guides/choose-a-codec/quick-recommendations.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/guides/choose-a-codec/quick-recommendations.md",
      "checksum": "2de080132910bdef00ad6179abe504db5101a24fbcd9cb5b49f91f313385fc44",
      "bytes": 1234
    },
    {
      "id": "video-codecs",
      "title": "Video codecs",
      "depth": 2,
      "anchor": "video-codecs",
      "canonicalUrl": "https://encode.wiki/guides/choose-a-codec/#video-codecs",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/guides/choose-a-codec/video-codecs.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/guides/choose-a-codec/video-codecs.md",
      "checksum": "44c10e5e569a71d001d8794dbe4dffc27b5ab87f318232879bf72d3f01bb856f",
      "bytes": 1429
    },
    {
      "id": "audio-codecs",
      "title": "Audio codecs",
      "depth": 2,
      "anchor": "audio-codecs",
      "canonicalUrl": "https://encode.wiki/guides/choose-a-codec/#audio-codecs",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/guides/choose-a-codec/audio-codecs.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/guides/choose-a-codec/audio-codecs.md",
      "checksum": "20eb645b114585feeac93636384854d66956516269228783611762c90b72fa66",
      "bytes": 575
    },
    {
      "id": "lossless-and-archival-video",
      "title": "Lossless and archival video",
      "depth": 2,
      "anchor": "lossless-and-archival-video",
      "canonicalUrl": "https://encode.wiki/guides/choose-a-codec/#lossless-and-archival-video",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/guides/choose-a-codec/lossless-and-archival-video.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/guides/choose-a-codec/lossless-and-archival-video.md",
      "checksum": "153c705bd99f75746f7e2639985aa32b8b022fbfc44a4c99f22b720136b8c9f2",
      "bytes": 647
    },
    {
      "id": "containers",
      "title": "Containers",
      "depth": 2,
      "anchor": "containers",
      "canonicalUrl": "https://encode.wiki/guides/choose-a-codec/#containers",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/guides/choose-a-codec/containers.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/guides/choose-a-codec/containers.md",
      "checksum": "af36cb4e1a630ebd4f2140af85ad5c94dfe2fe97d8d5cedd82b51e7af93d5c57",
      "bytes": 784
    }
  ],
  "outboundReferences": [
    "/codecs/video/ffv1/",
    "/guides/av1-with-svt-av1/",
    "/guides/quality-controls/",
    "/reference/browser-support-check/",
    "/reference/video-codec-support/",
    "/tools/software-encoders/x264/",
    "/tools/software-encoders/x265/",
    "/tools/utilities/dav1d/"
  ],
  "checksum": "4fb553a77c1b6c2b440dfb75447a8b79a25bf8aae82f87ae7b19d854f6792ef2",
  "contentFormat": "markdown",
  "markdown": "Pick the codec your playback targets can decode, then the best encoder for that codec. Better\ncompression is worthless if the device that has to play the file cannot decode it in hardware or\nsoftware.\n\n## Quick recommendations\n\n| Goal                                        | Video                                                       | Audio                    | Container   |\n| ------------------------------------------- | ----------------------------------------------------------- | ------------------------ | ----------- |\n| Efficient personal library or lossy archive | AV1 ([SVT-AV1](/guides/av1-with-svt-av1/)), 10-bit          | Opus, or copy the source | MKV         |\n| Plays on practically anything               | H.264 ([x264](/tools/software-encoders/x264/)), 8-bit 4:2:0 | AAC-LC                   | MP4         |\n| TVs, set-top boxes and Apple devices; HDR   | HEVC ([x265](/tools/software-encoders/x265/)), 10-bit       | AAC, or copy AC-3/E-AC-3 | MP4 or MKV  |\n| Web video                                   | AV1 or VP9, with an H.264 fallback                          | Opus (WebM) or AAC (MP4) | WebM or MP4 |\n| Editing intermediate                        | ProRes, DNxHR, or lossless UT Video                         | PCM                      | MOV or MKV  |\n| Lossless archive                            | [FFV1](/codecs/video/ffv1/)                                 | FLAC                     | MKV         |\n\n## Video codecs\n\n**AV1** gives the best compression of the widely supported codecs, and the encoders are free. Use\nit for your own library and for modern delivery. Its limitation is hardware decoding on older\ndevices: Android has had an AV1 decoder since Android 10 and requires AV1 on Android 14 devices,\nand Safari only plays AV1 on devices with a hardware decoder (iPhone 15 Pro, M3 Macs and later).\nSoftware decoding with [dav1d](/tools/utilities/dav1d/) is fast on desktop CPUs, but an old TV or\nstreaming stick without AV1 hardware may not play it at all. AV1's Main profile includes 10-bit, so\n10-bit output costs no compatibility.\n\n**HEVC (H.265)** compresses better than H.264 and has hardware decoding on most TVs, phones and\nGPUs made in the last several years. It is the usual choice for HDR10, HDR10+ and Dolby Vision\ndelivery to TVs. Browser support depends on hardware decoding and is uneven.\n\n**H.264 (AVC)** is the compatibility choice: it plays on essentially every device and browser.\nStick to 8-bit 4:2:0 (High profile); most hardware decoders and browsers cannot play the 10-bit and\n4:2:2 profiles.\n\n**VP9** sits between H.264 and AV1 in efficiency. It is still useful as a web fallback where AV1\nis unavailable, but for new encodes AV1 is usually the better choice.\n\n**VVC (H.266)** compresses better again, but player and hardware support is still thin. Use it only\nwhen you know the target can decode it.\n\n## Audio codecs\n\n- **Opus** is the best general-purpose lossy codec: around 128 kbit/s is close to transparent for\n  stereo music, and it stays usable for speech at very low bitrates. Use it in MKV, WebM and Ogg.\n- **AAC-LC** is the compatibility choice for MP4, Apple software and older hardware.\n- **FLAC** is the standard lossless format. Use it for archives and when you want to re-encode later\n  without stacking losses.\n- **Copy the source track** (`-c:a copy`) when it already plays on your targets. Converting one lossy\n  format to another always costs some quality.\n\n## Lossless and archival video\n\n[FFV1](/codecs/video/ffv1/) is the usual archival codec. It is standardized (RFC 9043), stores\nper-slice CRCs so damage can be detected, and is used by memory institutions. x264 and x265 also\nhave lossless modes (`-qp 0` for x264, `-x265-params lossless=1`), which are smaller but slower to\ndecode and edit. Lossless only means what you think if the pixel format stays the same: converting\n4:2:2 10-bit to `yuv420p` throws data away before the lossless encoder sees it.\n\nProRes and DNxHR are high-bitrate intermediates for editing. They are lossy, though visually very\nclose to the source at their higher profiles.\n\n## Containers\n\n- **MKV** holds practically any codec, any number of audio and subtitle tracks, chapters and font\n  attachments. It is the best container for a personal library.\n- **MP4** has the widest playback support (phones, browsers, TVs, Apple software). It officially\n  supports AV1, HEVC, H.264 and VP9 video and AAC, Opus and FLAC audio, but its subtitle support is\n  limited to timed-text formats such as `mov_text`.\n- **WebM** is a restricted Matroska profile for the web: VP8, VP9 or AV1 video, Vorbis or Opus audio,\n  and WebVTT subtitles.\n\nSee [video codec support](/reference/video-codec-support/) and\n[browser support](/reference/browser-support-check/) for device and browser details, and\n[quality controls](/guides/quality-controls/) once you have chosen an encoder.\n"
}
