VOB Subpicture Sub-Stream ID Range Explained
In DVD-Video VOB (Video Object) files, subpicture data such as subtitles, forced narratives, and menu highlights are multiplexed alongside audio and video tracks within MPEG-2 Program Streams. Because the standard MPEG-2 specification does not have native stream IDs for DVD subpictures, they are encapsulated within Private Stream 1. This article explains the exact sub-stream ID range assigned to these subpicture packets, how they are structured, and how demultiplexers identify them.
The Subpicture Sub-Stream ID Range
The sub-stream ID range assigned to subpicture packets in a VOB file
is 0x20 to 0x3F in
hexadecimal (or 32 to 63 in decimal).
This range provides 32 distinct sub-stream identifiers, which aligns with the DVD-Video standard's limit of up to 32 concurrent subpicture channels per title. These channels allow a single disc to support multiple subtitle languages, director commentary text, and multiple aspect-ratio variations (such as 16:9 widescreen, letterbox, and 4:3 pan-and-scan display modes).
Packet Structure and Demultiplexing
A standard MPEG-2 Program Stream uses a 1-byte Stream ID located
immediately after the 3-byte packet start code prefix
(0x000001). In DVD VOB files:
- Stream ID
0xBD(Private Stream 1): Indicates that the PES (Packetized Elementary Stream) packet contains private data, which includes AC-3 audio, DTS audio, LPCM audio, and subpictures. - PES Header: Contains timing information, such as the Presentation Time Stamp (PTS).
- Sub-Stream ID: The very first byte of the PES packet payload specifies the sub-stream ID.
When a demultiplexer reads 0xBD as the primary Stream
ID, it inspects the first byte of the payload to determine the specific
media type:
0x20–0x3F: Subpicture streams 0 through 310x80–0x87: AC-3 audio streams 0 through 70x88–0x8F: DTS audio streams 0 through 70xA0–0xA7: Linear PCM (LPCM) audio streams 0 through 7
Subpicture Data Content
When a packet with a sub-stream ID between 0x20 and
0x3F is processed, the remaining payload contains a
Subpicture Unit (SPU). The SPU contains:
- SPU Header: Defines the total size of the subpicture unit and the offset to the display control sequence table.
- Pixel Data: Run-length encoded (RLE) bitmapped graphic data limited to a 4-color palette mapped from a 16-color lookup table.
- Display Control Sequence Table (SP_DCSQ_TAB): Instructions detailing execution timing, display coordinates, color and transparency mappings, and visibility changes.
By checking for the 0x20 to 0x3F payload
prefix, decoders accurately isolate and reconstruct these timed
graphical overlays from the shared Private Stream 1 container.