Can You Split a VOB File by Byte Count?
This article examines whether a VOB (Video Object) file can be split arbitrarily by raw byte count without corrupting the container. It explores the underlying MPEG-2 Program Stream architecture, details what happens at the byte level during an unaligned split, and explains why byte-level slicing causes playback artifacts even if the stream remains technically recoverable.
The Short Answer
Strictly speaking, no. Slicing a VOB file at a completely random byte offset will corrupt the specific packet crossing that boundary. However, because VOB files are based on the MPEG-2 Program Stream (MPEG-2 PS) format, the file will not become entirely unreadable. Most media players will drop the damaged packet and resume playback at the next valid start code.
The Structure of a VOB File
To understand how byte splitting affects a VOB file, it helps to understand its internal structure:
- MPEG-2 Program Stream: Unlike modern containers
like MP4 or MKV that rely on centralized index headers (such as
moovatoms), a VOB file is a packetized, continuous stream. - Packets and Packs: Data inside a VOB is organized into discrete units called Packs (which contain a Pack Header) and Packetized Elementary Streams (PES).
- DVD Sector Size: In DVD-Video authoring, every VOB pack is aligned precisely to 2,048 bytes (2 KB), matching the optical sector size of a DVD disc.
What Happens During an Arbitrary Byte Split?
If you use a basic command-line tool (like split on
Linux or a generic file cutter) to divide a VOB file at an arbitrary
byte count, several issues arise:
- Broken Packet Headers: If the split lands in the middle of a pack header or PES header, that packet is truncated. The beginning chunk will end with incomplete data, and the next chunk will start with orphaned payload data missing its identifying header.
- Loss of Synchronization: A decoder must scan
forward through the second chunk until it finds a valid 4-byte start
code (such as
0x000001BAfor a pack header). Everything before that start code is discarded. - Broken Group of Pictures (GOP): Video frames rely on predictive compression (I, P, and B frames). If a split occurs mid-GOP, the second file will lack the reference I-frame (keyframe) required to decode subsequent frames, resulting in heavy macroblocking or a blank screen until the next keyframe arrives.
- Timestamp Disruptions: Audio and video synchronization relies on Presentation Time Stamps (PTS). Truncated packets can desynchronize audio and video streams at the split point.
Why DVD VOB Files Are Split by File Size
Commercial DVDs famously split video into multiple 1 GB
(VTS_01_1.VOB, VTS_01_2.VOB) segments. While
these look like raw byte splits, they are not completely arbitrary.
Authoring software ensures that the cut occurs exactly on a 2,048-byte
sector boundary. Furthermore, the accompanying IFO files hold
navigational data detailing the exact sector locations of cells and
chapters across those splits.
The Correct Way to Split a VOB File
If you must split a VOB file without re-encoding:
- Sector-Aligned Splitting: If maintaining raw stream structure is your only goal, split strictly on multiples of 2,048 bytes. This prevents packet header truncation, though it will not solve GOP/keyframe playback issues.
- Keyframe-Aware Splitting: Use container-aware tools
(such as FFmpeg with
-c copy, or specialized tools like MPEG2Schnitt) to split at keyframe boundaries. This preserves the container structure, guarantees instant playback on the split segments, and avoids A/V synchronization errors.