How DVD Players Switch Audio Streams on the Fly
When playing a DVD, switching between audio tracks—such as different languages or commentary tracks—happens almost instantaneously without interrupting the video. This seamless transition is achieved through the structural design of DVD Video Object (VOB) files, which multiplex several independent audio, video, and subtitle streams into a single container. By updating an internal system register, the DVD player instantly instructs its hardware demultiplexer to ignore the current audio packets and begin decoding packets carrying the newly selected audio identifier, keeping audio and video perfectly synchronized.
Multiplexed Architecture of VOB Files
A VOB file is based on the MPEG-2 Program Stream format. Inside a VOB, video, multiple audio channels, and sub-pictures (subtitles) do not exist as separate, isolated files; instead, they are sliced into small chunks called Packetized Elementary Stream (PES) packets. These packets are interleaved—or "multiplexed"—together along the timeline.
Because all audio tracks run alongside the video data on the disc, the DVD laser reads every available audio stream simultaneously as it scans the disc track. The player does not need to physically move its optical pickup head to another part of the disc when you switch languages, preventing video stutter or buffering delays.
Packet Identifiers and Sub-Stream IDs
To distinguish one stream from another, every packet in a VOB has a header containing an identification tag:
- MPEG Audio: Uses standard MPEG Stream IDs ranging
from
0xC0to0xDF. - AC-3 (Dolby Digital), DTS, and LPCM: These formats
share a dedicated MPEG identifier known as Private Stream
1 (
0xBD). To distinguish between them, the DVD specification places an extra byte at the beginning of the packet payload called a Sub-Stream ID. For example, AC-3 streams typically occupy IDs0x80through0x87, while DTS streams use0x88through0x8F.
Up to eight distinct audio streams can coexist within a single DVD title, each assigned its own unique ID.
The Switching Process Inside the Player
When you press the "Audio" button on a remote control, the player executes the switch using the following sequence:
- Register Update: The player updates an internal register known as SPRM 1 (System Parameter Register 1), which stores the currently active audio stream number.
- Demultiplexer Redirection: The demultiplexer (demuxer) constantly inspects the header of every incoming packet. Once SPRM 1 updates, the demuxer immediately stops routing packets with the old ID to the audio decoder and starts routing incoming packets that match the new ID.
- Buffer Flushing: The audio decoder discards the remaining unplayed frames of the previous audio stream from its small internal buffer to prevent overlap.
- Time Stamp Synchronization: Each PES packet includes a Presentation Time Stamp (PTS). The audio decoder reads the PTS in the new stream and aligns it with the player's master System Time Clock (STC), which is driven by the continuous video playback.
Because the disc read head continues reading the multiplexed stream uninterrupted, the video decoder never starves for data. The new audio stream locks into the master clock within a fraction of a second, completing the switch smoothly on the fly.