{
  "schemaVersion": 1,
  "contentVersion": "ca42e61ede0a24f789d7287a0001244ad22f4abf",
  "id": "docs/codecs/audio/dolby",
  "collection": "docs",
  "title": "Dolby audio codecs and Atmos",
  "description": "A practical guide to Dolby AC-3, E-AC-3, TrueHD and AC-4, what Atmos actually is, and what FFmpeg can and cannot encode or preserve.",
  "canonicalUrl": "https://encode.wiki/codecs/audio/dolby/",
  "apiUrl": "https://encode.wiki/api/v1/documents/docs/codecs/audio/dolby.json",
  "markdownUrl": "https://encode.wiki/api/v1/markdown/docs/codecs/audio/dolby.md",
  "status": "current",
  "tags": [
    "migrated"
  ],
  "license": "CC BY-SA 4.0",
  "dates": {
    "lastVerified": "2026-10-08T00:00:00.000Z"
  },
  "authors": [],
  "sources": [
    {
      "title": "Dolby Digital Plus technology overview",
      "url": "https://professional.dolby.com/technologies/dolby-digital-plus/",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "Dolby TrueHD",
      "url": "https://professional.dolby.com/en-in/tv/dolby-truehd/",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "Dolby AC-4 technology overview",
      "url": "https://professional.dolby.com/technologies/ac-4/",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "Dolby AC-4 FAQ",
      "url": "https://professionalsupport.dolby.com/s/article/Dolby-AC-4-FAQ",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "FFmpeg codecs documentation — ac3",
      "url": "https://ffmpeg.org/ffmpeg-codecs.html#ac3-and-ac3_005ffixed",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "FFmpeg 9.0.2 libavcodec/mlpenc.c (TrueHD encoder, experimental)",
      "url": "https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavcodec/mlpenc.c",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "FFmpeg 9.0.2 libavcodec/mlpdec.c (TrueHD decoder and Atmos detection)",
      "url": "https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavcodec/mlpdec.c",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "FFmpeg 9.0.2 MPEG-TS demuxer (HDMV TrueHD with embedded AC-3)",
      "url": "https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavformat/mpegts.c",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "Dolby Digital Plus online delivery kit, signalling Atmos in HLS",
      "url": "https://ott.dolby.com/OnDelKits/DDP/Dolby_Digital_Plus_Online_Delivery_Kit_v1.5/Documentation/Content_Creation/SDM/help_files/topics/hls_c_hls_signal_atmos_ddp.html",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    },
    {
      "title": "FFmpeg 9.0.2 libavcodec/profiles.c (Atmos profile names)",
      "url": "https://github.com/FFmpeg/FFmpeg/blob/n9.0.2/libavcodec/profiles.c",
      "accessedAt": "2026-10-08T00:00:00.000Z"
    }
  ],
  "provenance": {
    "originUrl": "https://github.com/av1-community-contributors/codec-wiki/blob/37c3317fd058b23c71a87679bed5619a98f77752/docs/audio/Dolby.mdx",
    "originCommit": "37c3317fd058b23c71a87679bed5619a98f77752",
    "migratedAt": "2026-08-21T00:00:00.000Z",
    "modified": true,
    "originPath": "docs/audio/Dolby.mdx"
  },
  "headings": [
    {
      "depth": 2,
      "text": "The codecs",
      "anchor": "the-codecs"
    },
    {
      "depth": 2,
      "text": "Atmos is not a codec",
      "anchor": "atmos-is-not-a-codec"
    },
    {
      "depth": 2,
      "text": "What FFmpeg can and cannot do",
      "anchor": "what-ffmpeg-can-and-cannot-do"
    },
    {
      "depth": 2,
      "text": "Commands",
      "anchor": "commands"
    },
    {
      "depth": 2,
      "text": "When to choose what",
      "anchor": "when-to-choose-what"
    }
  ],
  "sections": [
    {
      "id": "_preamble",
      "title": "Page introduction",
      "depth": 0,
      "canonicalUrl": "https://encode.wiki/codecs/audio/dolby/",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/dolby/_preamble.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/dolby/_preamble.md",
      "checksum": "eae77ded6501b5010ecc4733de78b148007e9a87eb9b0580494ae1923b85bebb",
      "bytes": 509
    },
    {
      "id": "the-codecs",
      "title": "The codecs",
      "depth": 2,
      "anchor": "the-codecs",
      "canonicalUrl": "https://encode.wiki/codecs/audio/dolby/#the-codecs",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/dolby/the-codecs.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/dolby/the-codecs.md",
      "checksum": "e244de1b296169b5f641546c356aaf4f0c25c15556588bcb74bd238294a0d501",
      "bytes": 1115
    },
    {
      "id": "atmos-is-not-a-codec",
      "title": "Atmos is not a codec",
      "depth": 2,
      "anchor": "atmos-is-not-a-codec",
      "canonicalUrl": "https://encode.wiki/codecs/audio/dolby/#atmos-is-not-a-codec",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/dolby/atmos-is-not-a-codec.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/dolby/atmos-is-not-a-codec.md",
      "checksum": "f37910c005e8cd6ed1c1ba980a435db9b23f85f617243d42bb1185ebd40c0f9e",
      "bytes": 920
    },
    {
      "id": "what-ffmpeg-can-and-cannot-do",
      "title": "What FFmpeg can and cannot do",
      "depth": 2,
      "anchor": "what-ffmpeg-can-and-cannot-do",
      "canonicalUrl": "https://encode.wiki/codecs/audio/dolby/#what-ffmpeg-can-and-cannot-do",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/dolby/what-ffmpeg-can-and-cannot-do.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/dolby/what-ffmpeg-can-and-cannot-do.md",
      "checksum": "d820425529e7881743135c1af5a39568dd72a7705fc8750b056b589f63d43c4e",
      "bytes": 796
    },
    {
      "id": "commands",
      "title": "Commands",
      "depth": 2,
      "anchor": "commands",
      "canonicalUrl": "https://encode.wiki/codecs/audio/dolby/#commands",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/dolby/commands.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/dolby/commands.md",
      "checksum": "98445236691323f88d77f57fd673033131520d9922b5418c25be1e9006bb70ef",
      "bytes": 1061
    },
    {
      "id": "when-to-choose-what",
      "title": "When to choose what",
      "depth": 2,
      "anchor": "when-to-choose-what",
      "canonicalUrl": "https://encode.wiki/codecs/audio/dolby/#when-to-choose-what",
      "apiUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/dolby/when-to-choose-what.json",
      "markdownUrl": "https://encode.wiki/api/v1/sections/docs/codecs/audio/dolby/when-to-choose-what.md",
      "checksum": "61f56f0fb081107c1108b82e4326ef24f30a6c6ad25c3772ea7ab91892c482c1",
      "bytes": 533
    }
  ],
  "outboundReferences": [
    "/codecs/audio/aac/",
    "/codecs/audio/flac/",
    "/codecs/audio/opus/",
    "/codecs/audio/spatial-audio/"
  ],
  "checksum": "4440ff69888514cbedbed74caccb8ecc1cdc15421a8d9646a55b9f79e4325a40",
  "contentFormat": "markdown",
  "markdown": "Dolby has several unrelated-looking things under one name: AC-3 and E-AC-3 are lossy surround codecs, TrueHD is a lossless one, AC-4 is a newer lossy one, and Atmos is an immersive-audio system that rides on top of E-AC-3, TrueHD and AC-4. If you work with Blu-rays, streaming rips or home theatre files you will meet all of them. The practical rule: **copy Dolby tracks rather than re-encoding them**, because FFmpeg can only make plain channel-based AC-3, E-AC-3 and (experimentally) TrueHD, with no Atmos.\n\n## The codecs\n\n| Codec | Type | What it is |\n| --- | --- | --- |\n| **AC-3** (Dolby Digital) | Lossy | The original 5.1 codec: DVD, broadcast, Blu-ray core tracks. Up to 640 kbit/s. Every surround device plays it. |\n| **E-AC-3** (Dolby Digital Plus) | Lossy | AC-3's successor: more efficient, 32 kbit/s to 6 Mbit/s, up to 7.1 discrete channels. The main surround codec of streaming services; also how Atmos reaches streaming. Not bitstream-compatible with AC-3, but E-AC-3 decoders also decode AC-3. |\n| **TrueHD** | Lossless | MLP-derived lossless codec used on Blu-ray: 44.1–192 kHz, up to 24-bit, up to 16 channels in the format. Blu-ray limits it to eight channels at 96 kHz or six at 192 kHz. Carries Atmos on disc. |\n| **AC-4** | Lossy | Newer broadcast and streaming codec with multiple presentations (languages, dialogue enhancement) and Atmos support. Not compatible with AC-3 or E-AC-3. |\n\nOn Blu-ray, a TrueHD track is interleaved with an AC-3 version in the same stream for players that cannot decode TrueHD. FFmpeg and eac3to expose the two as separate tracks, so you can keep just the lossless one.\n\n## Atmos is not a codec\n\nAtmos is a production and rendering system. A mix is a channel bed (for example 7.1.2) plus positioned audio objects and metadata, and the player's renderer maps that to whatever speakers or headphones are present. That payload is carried by a normal Dolby codec:\n\n- **TrueHD Atmos** on Blu-ray: the usual lossless 7.1/5.1/stereo presentations, rendered from the full mix, plus an extra substream with the object data.\n- **E-AC-3 with JOC** (Joint Object Coding) on streaming: a lossy 5.1 or 7.1 mix rendered from the full mix, plus side data from which an Atmos decoder reconstructs the objects. Decoders without Atmos support play the channel mix.\n- **AC-4** for broadcast and some streaming.\n\nSo an E-AC-3 or TrueHD file is not necessarily Atmos; check the profile. `ffprobe` reports Atmos streams as \"Dolby Digital Plus + Dolby Atmos\" or \"Dolby TrueHD + Dolby Atmos\" in the `profile` field.\n\n## What FFmpeg can and cannot do\n\n| Task | FFmpeg |\n| --- | --- |\n| Copy any Dolby track into another container | Yes (`-c copy`). Atmos survives. |\n| Encode plain AC-3 or E-AC-3 from PCM | Yes: `ac3` and `eac3`, up to 5.1. A 7.1 input is silently downmixed to 5.1. |\n| Encode TrueHD from PCM | Experimental: `truehd`, up to 5.1, needs `-strict -2`. Bit-exact on decode. |\n| Encode AC-4 | No. |\n| Create Atmos | No. Needs Dolby's Atmos tools and licensed encoders. |\n| Decode Atmos | Decodes the backward-compatible 7.1 or 5.1 mix and ignores the object data, so height and object positioning are lost. |\n\nRe-encoding an Atmos track with FFmpeg to AC-3, E-AC-3, AAC or Opus permanently discards the object data. If you need a compatibility copy, make it additionally and keep the original track.\n\n## Commands\n\nCopy a Dolby track into a new file without touching the audio:\n\n```sh\nffmpeg -i input.mkv -map 0:a:0 -c:a copy output.mka\n```\n\nEncode a 5.1 PCM master to AC-3 or E-AC-3:\n\n```sh\nffmpeg -i input.wav -c:a ac3 -b:a 640k output.ac3\nffmpeg -i input.wav -c:a eac3 -b:a 640k output.eac3\n```\n\nUse 448 kbit/s for 5.1 AC-3 if the target doesn't need the maximum. Stereo is typically 192 kbit/s. The encoder has a lot of metadata options (`-dialnorm`, `-dmix_mode`, `-center_mixlev` and others) that matter for broadcast delivery and rarely otherwise; the defaults are fine for a compatibility track.\n\nEncode lossless TrueHD (5.1 or fewer channels):\n\n```sh\nffmpeg -i input.wav -c:a truehd -strict -2 output.thd\n```\n\nThis is experimental and rarely worth it; if you just want lossless surround, use [FLAC](/codecs/audio/flac/).\n\nAC-3, E-AC-3 and TrueHD go into MP4 (E-AC-3 and AC-3) or Matroska (all). MP4 labels them `ac-3` and `ec-3`. Most TVs and receivers want a bitstream passthrough over HDMI to get Atmos, which means copying the track, not decoding it.\n\n## When to choose what\n\n- **Remuxing a disc or streaming rip:** keep the original track.\n- **A surround compatibility copy for a TV:** E-AC-3 or AC-3 at 448–640 kbit/s. For most people [AAC](/codecs/audio/aac/) or [Opus](/codecs/audio/opus/) are better codecs, but only the Dolby ones pass through to an AV receiver.\n- **Lossless surround you encode yourself:** [FLAC](/codecs/audio/flac/).\n- **Authoring Atmos:** professional Dolby tools; see [spatial and immersive audio](/codecs/audio/spatial-audio/) for the open alternatives.\n"
}
