How VOB Files Identify AC-3 and Subpictures via 0xBD

DVD Video Object (VOB) files rely on the MPEG-2 Program Stream specification, which reserves the stream ID 0xBD for private, non-standard data known as private_stream_1. Because standard MPEG-2 only inherently defines MPEG audio and video streams, DVD authors multiplex secondary audio formats—such as AC-3 (Dolby Digital) and DTS—alongside bitmap-based subpicture subtitles into this single 0xBD identifier. To separate and decode these distinct data types, DVD decoders evaluate a proprietary sub-stream header embedded directly at the start of the PES (Packetized Elementary Stream) payload.

In a standard MPEG-2 PES packet, a 4-byte start code prefix (0x000001) is immediately followed by a 1-byte Stream ID. When this ID equals 0xBD, the demultiplexer recognizes that the packet contains private data. However, the standard MPEG-2 header does not define what kind of data follows. To solve this, the DVD-Video specification mandates that the first byte of the PES packet payload acts as a Sub-Stream ID. Demuxers read this byte to identify the elementary stream type and track index.

The sub-stream ID byte uses specific numeric ranges to classify the data:

Beyond the 1-byte sub-stream ID, the DVD format includes specific private header structures depending on whether the payload is audio or subpicture data:

For AC-3 audio packets, the sub-stream ID is typically followed by three additional management bytes before the actual AC-3 audio frames begin:

  1. Number of Frame Headers (1 byte): Indicates how many AC-3 sync frames start in this packet.
  2. First Access Unit Pointer (2 bytes): An offset pointing to the byte position where the first complete AC-3 audio sync word (0x0B77) begins, allowing the decoder to find frame boundaries even if an audio frame was split across multiple PES packets.

For Subpicture packets, the 1-byte sub-stream ID (0x200x3F) is immediately followed directly by the subpicture data unit (SPU). A subpicture unit contains a 4-byte header consisting of the total SPU size (2 bytes) and the offset to the subpicture display control sequence table (2 bytes), followed by the run-length encoded bitmap pixel data.

By reading the MPEG-2 PES Stream ID 0xBD and immediately inspecting the subsequent sub-stream ID byte, a VOB demultiplexer can route incoming packets to either the AC-3 audio decoder or the subpicture rendering engine.