Role of Pack Start Code 0x000001BA in VOB Streams

The pack start code 0x000001BA serves as the foundational synchronization marker within raw DVD Video Object (VOB) streams, signaling the beginning of a new pack in the MPEG-2 Program Stream architecture. This 32-bit prefix delineates individual data packs, encapsulates vital timing information via the System Clock Reference, defines multiplexing transfer rates, and ensures that the stream properly aligns with the 2,048-byte physical sectors of standard DVD media.

Pack Boundary and Sector Alignment

A VOB file is structurally an MPEG-2 Program Stream tailored for optical media. To maintain compatibility with DVD file systems (UDF/ISO 9660), data must be organized into fixed 2,048-byte (2 KB) blocks.

The 4-byte sequence 0x000001BA acts as a unique delimiter that tells the demuxer a new 2 KB pack is starting. Because raw bitstreams can experience transmission loss or reading errors, hardware and software decoders scan for this exact byte sequence to establish packet boundaries and align their buffers to the incoming stream.

Timing and Synchronization via System Clock Reference (SCR)

Directly following the 0x000001BA code is the pack header, which houses the System Clock Reference (SCR). The SCR is a 42-bit timestamp composed of a 33-bit base (running at 90 kHz) and a 9-bit extension (running at 27 MHz).

The role of this data is to synchronize the decoder’s internal system clock (STC) with the encoder’s clock. While Presentation Time Stamps (PTS) and Decoding Time Stamps (DTS) inside individual PES packets dictate when frames are decoded and displayed, the SCR provided right after the 0x000001BA marker dictates the precise arrival time of the byte stream into the decoder buffers, preventing buffer overflow or underflow.

Multiplex Rate Specification

Immediately after the SCR field in the pack header, the stream specifies the program_mux_rate. This 22-bit integer indicates the rate at which the Program Stream was multiplexed, measured in units of 50 bytes per second.

The decoder uses this value to determine the maximum bandwidth of the VOB stream at that specific point in time. This information is critical for managing data flow, especially when handling multi-angle tracks, varying audio streams (AC-3, DTS, LPCM), and dynamic sub-picture data multiplexed into the same VOB file.

Stream Parsing and Error Recovery

If a reading error occurs—such as a scratched disc surface causing dropped bytes—the parser loses track of where packetized elementary streams (PES) begin and end. The 0x000001BA code provides an error-recovery checkpoint. The parser can skip corrupted bytes until it encounters 0x000001BA, allowing it to discard damaged sectors, reset its parsing state, read the new SCR, and safely resume playback from the next intact 2 KB pack.