The index is text, one setting per line, with # starting a comment.
VobSub has no published specification. Its files carry their own explanation in the
comments the program writes, and these and the Matroska subtitle notes are the sources
for this page.
Version line
# VobSub index file, v7 (do not modify this line!)
The number after v is the format version; this one is a comment by form but
significant in fact. Matroska’s S_VOBSUB codec accepts only version 7 and
later. Older index files must be converted first, for example with SubResync.
Global settings
Each is a name: value line. Matroska copies these into the track’s
codec private data.
| Name | Example | Meaning |
|---|---|---|
size | 720x576 | Original frame size in pixels: width, then height. |
org | 0, 0 | Origin of the image relative to the upper-left corner. Can be overridden by align. |
scale | 100%, 100% | Horizontal and vertical scaling. The origin is the upper-left corner or the alignment point. |
alpha | 100% | Alpha blending of the whole image. |
smooth | OFF | Smoothing for very blocky images. ON, OFF or OLD (OLD for no filtering). |
fadein/out | 50, 50 | Fade-in and fade-out times in milliseconds. |
align | OFF at LEFT TOP | Forces subtitle placement relative to (org.x, org.y). ON or OFF, then at and a horizontal and vertical position such as LEFT TOP. |
time offset | 0 | Correction for non-progressive desynchronisation, in milliseconds or hh:mm:ss:ms. Not effective in DirectVobSub, where delay is used. |
forced subs | OFF | ON shows only forced subtitles, OFF shows everything. |
palette | 000000, f0f0f0, … | The original palette of the DVD: 16 hexadecimal colours. Each is RRGGBB. |
custom colors | OFF, tridx: 0000, colors: 000000, 000000, 000000, 000000 | Whether to use a custom colour set, which of the four pixel values are transparent (tridx), and the four colours. |
langidx | 0 | Index of the language to show by default. |
Language tracks
Settings are followed by one or more language blocks.
| Line | Example | Meaning |
|---|---|---|
id | id: en, index: 0 | The two-letter language and the track’s index. The index is the number used by the private stream in the .sub file. |
alt | alt: English | An alternative track name for DirectVobSub and Windows Media Player 6.x. Written commented out by default. |
# Vob/Cell ID | # Vob/Cell ID: 1, 1 (PTS: 0) | A comment grouping the following subtitles by VOB and cell. Not interpreted. |
delay | delay: +00:00:02:000 | A correction inserted between subtitles to repair desynchronisation, usually after a change of VOB id. Written [sign]hh:mm:ss:ms. |
timestamp | timestamp: 00:01:25:880, filepos: 000003800 | One subtitle. |
In a timestamp line, the time is hh:mm:ss:ms and
filepos is a nine-digit hexadecimal byte offset into the
.sub file. Lines may be edited or removed, provided the times stay in
increasing order. A negative delay cannot put a subtitle before the
previous one.
Worked example
# VobSub index file, v7 (do not modify this line!)
size: 720x576
org: 0, 0
scale: 100%, 100%
alpha: 100%
smooth: OFF
fadein/out: 50, 50
align: OFF at LEFT TOP
time offset: 0
forced subs: OFF
palette: 000000, f0f0f0, cccccc, 999999, 3333fa, 1111bb, fa3333, bb1111, 33fa33, 11bb11, fafa33, bbbb11, fa33fa, bb11bb, 33fafa, 11bbbb
custom colors: OFF, tridx: 0000, colors: 000000, 000000, 000000, 000000
langidx: 0
# English
id: en, index: 0
# Vob/Cell ID: 1, 1 (PTS: 0)
timestamp: 00:00:01:000, filepos: 000000000
timestamp: 00:00:04:000, filepos: 000000800
Not confirmed
The exact set of accepted words after smooth and align comes
from files written by VobSub, not from a specification. The rules that versions below
7 follow have not been found.