PES Packet Encapsulation in DVD VOB Packs

DVD Video Object (VOB) files rely on the MPEG-2 Program Stream specification, dividing multimedia data into fixed-size 2048-byte blocks known as packs. Within each pack, raw audio, video, or subpicture elementary streams are wrapped into Packetized Elementary Stream (PES) packets. This article explains how these elementary streams are formatted, addressed, and encapsulated within an individual VOB pack, detailing the role of pack headers, stream identifiers, synchronization timestamps, and padding mechanisms to ensure DVD hardware compliance.

The Fixed 2048-Byte Pack Structure

A VOB file is a sequence of continuous packs, each exactly 2048 bytes (2 KB) to match the physical sector size of a standard DVD-ROM. Unlike generic MPEG-2 Program Streams that allow variable-length packs, DVD authoring rules mandate this strict 2048-byte boundary.

An individual VOB pack typically encapsulates a single PES packet. The total byte budget of the pack is divided into:

  1. Pack Header (14 bytes)
  2. System Header (Optional, typically 24 bytes when present in navigation or initial packs)
  3. PES Packet (Variable length, consuming the bulk of the remaining bytes)
  4. Padding Packet or Stuffing Bytes (Variable length, added when the PES payload does not fill the 2048-byte limit)

Step 1: The Pack Header

Every VOB pack begins with a 14-byte Pack Header containing synchronization and multiplexing metadata:

Step 2: PES Packet Encapsulation

Directly following the Pack Header (or an optional System Header), the elementary stream data is framed by a PES header. The PES packet structure comprises the following fields:

Step 3: PES Header Extensions and Timing Data

Following the length field, the PES header includes optional flags and timing mechanisms essential for playback:

Step 4: Payload Insertion and Sector Alignment

The raw elementary stream (compressed video frames, audio frames, or run-length-encoded subtitle data) is placed into the PES payload.

Because elementary stream frames rarely divide evenly into the remaining space of a 2048-byte sector:

Once the payload and necessary padding bytes are assembled, the total block size equals precisely 2048 bytes, completing the encapsulation of the elementary stream into the VOB pack.