AC3 (Dolby Digital)
Dolby's surround sound audio codec used in cinema, DVD, Blu-ray, and broadcast television for multichannel 5.1 audio delivery.
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 linesYou 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
| Property | Details |
|---|---|
| File Extension | .ac3, .a52 |
| MIME Type | audio/ac3 |
| Container | Standalone (.ac3), also embedded in MKV, MP4, AVI, M2TS, VOB |
| Codec | AC-3 (ATSC A/52) |
| Compression | Lossy (perceptual coding) |
| Bitrate | 32 kbps to 640 kbps (common: 384-640 kbps for 5.1) |
| Sample Rate | 32, 44.1, 48 kHz |
| Bit Depth | Up to 24-bit (internal processing) |
| Channels | 1.0 (mono) to 5.1 (6 channels) |
| Frame Size | 1536 samples per channel (32 ms at 48 kHz) |
| Block Size | 256 samples; 6 blocks per frame |
Channel Configurations
| Configuration | Description | Typical Bitrate |
|---|---|---|
| 1.0 | Mono | 96-128 kbps |
| 2.0 | Stereo | 192-256 kbps |
| 3.0 | L, C, R | 256-320 kbps |
| 2.1 | Stereo + LFE | 192-256 kbps |
| 5.1 | L, C, R, Ls, Rs, LFE | 384-640 kbps |
Dolby Digital Family
| Format | Standard | Max Channels | Max Bitrate | Use Case |
|---|---|---|---|---|
| AC-3 (Dolby Digital) | A/52 | 5.1 | 640 kbps | DVD, broadcast, cinema |
| E-AC-3 (Dolby Digital Plus) | A/52B | 15.1 | 6.144 Mbps | Blu-ray, streaming, HDTV |
| Dolby TrueHD | — | 15.1 (Atmos obj.) | ~18 Mbps | Blu-ray (lossless) |
| Dolby Atmos | — | 128 tracks / objects | Varies | Cinema, Blu-ray, streaming |
How It Works
AC-3 uses a hybrid coding approach:
- Audio is windowed using 512-point MDCT (or 256-point for transients)
- Spectral data is grouped into frequency bands aligned with human hearing
- A psychoacoustic model determines masking thresholds
- Mantissa and exponent coding with adaptive bit allocation
- Channel coupling at high frequencies reduces data for surround channels
- 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
| Platform | Support |
|---|---|
| Windows | Native decoding; all major players |
| macOS | VLC, IINA, Plex (limited native) |
| Linux | FFmpeg, VLC, GStreamer |
| iOS | Limited to specific apps |
| Android | Via supported players; hardware passthrough varies |
| Web Browsers | Not directly supported in <audio> |
| Hardware | DVD/Blu-ray players, AV receivers, TVs, game consoles |
| Streaming | Netflix, 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.ac3for 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.wavto 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
Related Skills
3MF 3D Manufacturing Format
The 3MF file format — the modern replacement for STL in 3D printing, supporting colors, materials, multi-object assemblies, and precise manufacturing data in a single package.
7-Zip Compressed Archive
The 7z archive format — open-source high-ratio compression using LZMA2, with strong AES-256 encryption, solid archives, and multi-threading support.
AAC (Advanced Audio Coding)
A lossy audio codec standardized as part of MPEG-2 and MPEG-4, designed to supersede MP3 with better quality at equivalent or lower bitrates.
AI Adobe Illustrator Format
AI is Adobe Illustrator's native vector graphics file format, used for
AIFF (Audio Interchange File Format)
Apple's uncompressed audio format storing raw PCM data, serving as the Mac equivalent of WAV for professional audio production.
ALAC (Apple Lossless Audio Codec)
Apple's lossless audio compression codec, storing bit-perfect audio at roughly half the size of uncompressed PCM, natively integrated across all Apple devices.