AC-3 Audio Sub-Stream ID Range in VOB Files
This article provides an overview of the specific sub-stream identification numbers reserved for AC-3 (Dolby Digital) audio tracks within DVD Video Object (VOB) containers. It explains how MPEG-2 Program Streams organize private data streams and defines the exact byte range demuxers use to locate and extract AC-3 audio streams.
The AC-3 Sub-Stream ID Range
Inside a standard DVD VOB container, the reserved sub-stream ID range for AC-3 audio is 0x80 to 0x87 (hexadecimal), which corresponds to 128 to 135 in decimal notation.
Because the DVD-Video standard allows a maximum of eight independent audio tracks per title, these eight identifiers map directly to the available audio slots:
- 0x80: AC-3 Audio Stream 0 (Default / Primary track)
- 0x81: AC-3 Audio Stream 1
- 0x82: AC-3 Audio Stream 2
- 0x83: AC-3 Audio Stream 3
- 0x84: AC-3 Audio Stream 4
- 0x85: AC-3 Audio Stream 5
- 0x86: AC-3 Audio Stream 6
- 0x87: AC-3 Audio Stream 7
How VOB Containers Handle AC-3 Audio
A VOB file is fundamentally an MPEG-2 Program Stream (MPEG-PES).
Standard MPEG-2 specifications do not natively define stream IDs for
third-party audio codecs such as Dolby Digital (AC-3) or DTS. To work
around this limitation, DVD authoring formats encapsulate these tracks
inside Private Stream 1, designated by the stream ID
byte 0xBD.
To distinguish between different formats sharing Private Stream 1,
the format inserts a secondary header at the start of the PES packet
payload. The very first byte of this payload is the sub-stream ID. When
a demultiplexer reads a packet marked with stream ID 0xBD,
it checks this payload byte:
- If the byte falls between 0x80 and 0x87, the demuxer processes the payload as AC-3 audio.
- If the byte falls between 0x88 and 0x8F, it is identified as DTS audio.
- If the byte falls between 0xA0 and 0xA7, it is parsed as Linear PCM (LPCM).
- If the byte falls between 0x20 and 0x3F, it is routed to the DVD sub-picture (subtitle) decoder.
Following the 0x80–0x87 sub-stream byte in
an AC-3 packet, there is typically a 3-byte audio header containing
frame configuration details before the standard AC-3 syncword
(0x0B77) begins the actual compressed audio frame.