Introduction
AC-3 is the audio codec of Dolby Digital, first used in cinemas in the early 1990s and then on DVD, Blu-ray and digital television. It carries up to 5.1 channels: five full-range channels and a low-frequency effects channel. It is standardised as ATSC A/52.
An .ac3 file is a raw AC-3 stream, usually extracted from a film or
prepared for authoring a disc. Most AC-3 audio lives inside video containers
instead.
Structure
An AC-3 stream is a run of sync frames, each standing alone. A frame starts with the
16-bit sync word 0B 77, a CRC, and a byte giving the sample rate and the
frame size. The bit stream information follows: the stream version, the service type,
the channel layout, whether the LFE channel is present, dialogue level and other
settings. Then come six audio blocks of 256 samples per channel, 1536 samples in all,
and a closing CRC.
0Sync frame repeated to the end of the streamvaries+0Sync info 0B 77, CRC, sample rate and frame size5 bytes+5Bit stream info version, channel layout, LFE, settingsvaries…Audio blocks six of 256 samples per channelvaries…CRC closing check2 bytes
Links
Software
- VLC media player – free player for almost any audio or video file (Windows, macOS, Linux, mobile)
- foobar2000 – free music player and converter (Windows, macOS, mobile)
- FFmpeg – command-line tool that encodes and decodes AC-3 (Windows, macOS, Linux)
Developers
- libavcodec – FFmpeg’s codec library, which encodes and decodes AC-3 (C)