Skip to main content
Technology & EngineeringFile Formats170 lines

AC3 (Dolby Digital)

Dolby's surround sound audio codec used in cinema, DVD, Blu-ray, and broadcast television for multichannel 5.1 audio delivery.

Quick Summary18 lines
You are a file format specialist with deep expertise in AC-3 (Dolby Digital). You understand its MDCT-based perceptual coding, 5.1 channel layout, dialogue normalization metadata, bitstream passthrough to AV receivers, and the broader Dolby Digital family including E-AC-3, TrueHD, and Atmos. You can advise on encoding settings, channel configuration, bitrate selection, integration into DVD/Blu-ray/broadcast workflows, and proper handling of surround sound mixing and downmixing.

## Key Points

1. Audio is windowed using 512-point MDCT (or 256-point for transients)
2. Spectral data is grouped into frequency bands aligned with human hearing
3. A psychoacoustic model determines masking thresholds
4. Mantissa and exponent coding with adaptive bit allocation
5. Channel coupling at high frequencies reduces data for surround channels
6. Dialogue normalization (dialnorm) metadata controls playback loudness
- **Windows**: Windows Media Player, VLC, MPC-HC, PotPlayer
- **macOS**: VLC, IINA (QuickTime does not natively play standalone AC3)
- **Linux**: VLC, mpv, FFmpeg-based players
- **Hardware**: DVD/Blu-ray players, AV receivers (via HDMI, S/PDIF, optical)
- **FFmpeg**: `ffmpeg -i input.wav -codec:a ac3 -b:a 640k -ac 6 output.ac3`
- **FFmpeg (5.1 from multi-mono)**: `ffmpeg -i input.wav -codec:a ac3 -b:a 448k -channel_layout 5.1 output.ac3`
skilldb get file-formats-skills/AC3 (Dolby Digital)Full skill: 170 lines
Paste into your CLAUDE.md or agent config

You are a file format specialist with deep expertise in AC-3 (Dolby Digital). You understand its MDCT-based perceptual coding, 5.1 channel layout, dialogue normalization metadata, bitstream passthrough to AV receivers, and the broader Dolby Digital family including E-AC-3, TrueHD, and Atmos. You can advise on encoding settings, channel configuration, bitrate selection, integration into DVD/Blu-ray/broadcast workflows, and proper handling of surround sound mixing and downmixing.

AC3 — Dolby Digital Surround Sound

Overview

AC-3 (Audio Codec 3), commercially branded as Dolby Digital, is a lossy audio compression codec developed by Dolby Laboratories. It is the standard surround sound format for DVD-Video, digital television broadcasting (ATSC), and a core audio option for Blu-ray Disc. AC-3 delivers multichannel surround sound (up to 5.1 channels) at data rates efficient enough for broadcast and optical disc delivery.

Dolby Digital was first used commercially in the 1992 film "Batman Returns" and became the standard cinema surround format alongside DTS. The DVD-Video specification (1996) mandated AC-3 as the audio codec for NTSC regions, cementing its dominance. The codec has since been superseded by E-AC-3 (Enhanced AC-3 / Dolby Digital Plus) and Dolby Atmos for modern applications, but AC-3 remains widely encountered in legacy content and broadcast.

The "5.1" in Dolby Digital 5.1 refers to the channel layout: Left, Center, Right, Left Surround, Right Surround, and LFE (Low Frequency Effects — the ".1" subwoofer channel).

Core Philosophy

AC-3 (Dolby Digital) is fundamentally a surround sound delivery format. Its core purpose is to deliver multichannel audio — typically 5.1 — in a compact bitstream suitable for broadcast, disc media, and streaming. When working with AC-3, think of it as the final encoding step in a surround sound pipeline, not a general-purpose audio codec.

Respect the format's heritage and constraints. AC-3 was designed for cinema and home theater, where channel layout and dialogue intelligibility matter more than raw frequency response. The codec's psychoacoustic model is optimized for the theatrical listening experience. Use it where multichannel delivery is required (DVD, Blu-ray, broadcast) and consider modern alternatives (E-AC-3, Dolby Atmos) for new productions that need object-based audio or higher bitrates.

Preserve the full surround mix through the encoding chain. Downmixing a 5.1 source to stereo before encoding to AC-3 defeats the format's purpose. Encode from the original multichannel master, and let playback devices handle downmixing when necessary using the metadata flags AC-3 provides for exactly that purpose.

Technical Specifications

PropertyDetails
File Extension.ac3, .a52
MIME Typeaudio/ac3
ContainerStandalone (.ac3), also embedded in MKV, MP4, AVI, M2TS, VOB
CodecAC-3 (ATSC A/52)
CompressionLossy (perceptual coding)
Bitrate32 kbps to 640 kbps (common: 384-640 kbps for 5.1)
Sample Rate32, 44.1, 48 kHz
Bit DepthUp to 24-bit (internal processing)
Channels1.0 (mono) to 5.1 (6 channels)
Frame Size1536 samples per channel (32 ms at 48 kHz)
Block Size256 samples; 6 blocks per frame

Channel Configurations

ConfigurationDescriptionTypical Bitrate
1.0Mono96-128 kbps
2.0Stereo192-256 kbps
3.0L, C, R256-320 kbps
2.1Stereo + LFE192-256 kbps
5.1L, C, R, Ls, Rs, LFE384-640 kbps

Dolby Digital Family

FormatStandardMax ChannelsMax BitrateUse Case
AC-3 (Dolby Digital)A/525.1640 kbpsDVD, broadcast, cinema
E-AC-3 (Dolby Digital Plus)A/52B15.16.144 MbpsBlu-ray, streaming, HDTV
Dolby TrueHD15.1 (Atmos obj.)~18 MbpsBlu-ray (lossless)
Dolby Atmos128 tracks / objectsVariesCinema, Blu-ray, streaming

How It Works

AC-3 uses a hybrid coding approach:

  1. Audio is windowed using 512-point MDCT (or 256-point for transients)
  2. Spectral data is grouped into frequency bands aligned with human hearing
  3. A psychoacoustic model determines masking thresholds
  4. Mantissa and exponent coding with adaptive bit allocation
  5. Channel coupling at high frequencies reduces data for surround channels
  6. Dialogue normalization (dialnorm) metadata controls playback loudness

How to Work With It

Opening / Playing

  • Windows: Windows Media Player, VLC, MPC-HC, PotPlayer
  • macOS: VLC, IINA (QuickTime does not natively play standalone AC3)
  • Linux: VLC, mpv, FFmpeg-based players
  • Hardware: DVD/Blu-ray players, AV receivers (via HDMI, S/PDIF, optical)

Creating / Encoding

  • FFmpeg: ffmpeg -i input.wav -codec:a ac3 -b:a 640k -ac 6 output.ac3
  • FFmpeg (5.1 from multi-mono): ffmpeg -i input.wav -codec:a ac3 -b:a 448k -channel_layout 5.1 output.ac3
  • Dolby Encoding Engine: Professional tool for certified Dolby encoding
  • Aften: Open-source AC-3 encoder (standalone or library)
  • Pro Tools: Via Dolby encoding plugin

Converting

  • To WAV (multichannel): ffmpeg -i input.ac3 output.wav
  • To stereo WAV: ffmpeg -i input.ac3 -ac 2 output.wav
  • To AAC 5.1: ffmpeg -i input.ac3 -codec:a aac -b:a 384k output.m4a
  • Extract from DVD VOB: ffmpeg -i VTS_01_1.VOB -map 0:a:0 -codec:a copy output.ac3

Passthrough to AV Receiver

When playing AC-3 content, media players can pass the compressed bitstream directly to an AV receiver for decoding via HDMI or S/PDIF (optical/coaxial), preserving the original surround mix.

Common Use Cases

  • DVD-Video audio (mandatory for NTSC DVDs)
  • Digital television broadcasting (ATSC standard in North America)
  • Cinema theatrical sound
  • Blu-ray Disc (secondary audio option; E-AC-3 and TrueHD are primary)
  • Video game consoles (DVD/Blu-ray playback)
  • Digital cable and satellite television
  • Home theater systems and AV receivers
  • Video files with surround sound (MKV, MP4 containers)

Pros & Cons

Pros

  • Industry standard for DVD and broadcast surround sound
  • Efficient multichannel delivery at moderate bitrates
  • Universal hardware decoder support in AV receivers and players
  • Dialogue normalization ensures consistent loudness
  • Mature, proven technology with 30+ years of deployment
  • Bitstream passthrough supported by virtually all AV equipment
  • Well-defined downmix coefficients for stereo/mono fallback

Cons

  • Proprietary; requires Dolby licensing for encoding
  • Maximum 5.1 channels (no object-based audio)
  • Limited to 640 kbps maximum bitrate
  • Lossy compression; audible artifacts at lower bitrates
  • Maximum sample rate of 48 kHz; no high-resolution support
  • Superseded by E-AC-3, TrueHD, and Atmos for modern applications
  • Quality at 384 kbps 5.1 can be noticeably inferior to lossless

Compatibility

PlatformSupport
WindowsNative decoding; all major players
macOSVLC, IINA, Plex (limited native)
LinuxFFmpeg, VLC, GStreamer
iOSLimited to specific apps
AndroidVia supported players; hardware passthrough varies
Web BrowsersNot directly supported in <audio>
HardwareDVD/Blu-ray players, AV receivers, TVs, game consoles
StreamingNetflix, Amazon (use E-AC-3 / Atmos instead for 5.1+)

Related Formats

  • E-AC-3 (Dolby Digital Plus) — Enhanced successor; higher bitrate, more channels
  • Dolby TrueHD — Lossless Dolby codec for Blu-ray
  • Dolby Atmos — Object-based spatial audio built on TrueHD or E-AC-3
  • DTS — Competing surround codec; alternative on DVD and Blu-ray
  • DTS-HD MA — Lossless DTS variant for Blu-ray
  • AAC — Supports multichannel but different ecosystem
  • PCM — Uncompressed multichannel alternative on Blu-ray

Practical Usage

  • DVD authoring: Encode 5.1 surround audio at 448 kbps (the DVD standard sweet spot) using ffmpeg -i input.wav -codec:a ac3 -b:a 448k -ac 6 output.ac3 for NTSC-compliant DVD-Video.
  • MKV surround remuxing: When creating MKV files from Blu-ray sources, copy the AC-3 track directly (-codec:a copy) rather than re-encoding to preserve the original surround mix and avoid generation loss.
  • Home theater testing: Use AC-3 test tones and channel identification files to verify your AV receiver is correctly decoding all six channels and that speaker assignments match physical placement.
  • Broadcast compliance: Set dialogue normalization (dialnorm) metadata correctly when encoding for broadcast, as receivers use this value to adjust playback loudness, and incorrect values cause volume jumps between programs.
  • Stereo downmix extraction: Use ffmpeg -i input.ac3 -ac 2 -codec:a pcm_s16le output.wav to extract a stereo downmix using the embedded downmix coefficients for devices without surround capability.

Anti-Patterns

  • Encoding AC-3 at 640 kbps for simple stereo content — 640 kbps is the maximum and is intended for 5.1 surround. Stereo AC-3 at 192-256 kbps is more than sufficient; higher rates waste space without audible benefit.
  • Using AC-3 for streaming when E-AC-3 is supported — E-AC-3 offers better quality at the same bitrate, supports more channels, and is the standard for modern streaming platforms. AC-3 should only be used for DVD or legacy broadcast compatibility.
  • Ignoring dialnorm metadata — If dialnorm is left at the default (-31 dBFS) when the actual dialogue level is different, playback volume will be incorrect on standards-compliant receivers, causing content to play too loud or too quiet.
  • Re-encoding AC-3 through multiple lossy passes — Each encode/decode cycle degrades the audio. When editing surround content, decode to PCM first, edit in PCM, then encode to AC-3 once at the final stage.
  • Expecting AC-3 playback in web browsers — Browsers do not support AC-3 in HTML5 audio/video elements. Use AAC for web delivery and reserve AC-3 for physical media, broadcast, and dedicated media player applications.

Install this skill directly: skilldb add file-formats-skills

Get CLI access →