Introduction
VobSub stores DVD subtitles outside the disc as a pair of files with the same name: a
text index with the extension .idx and a binary .sub file
holding the subtitle pictures. It was created by the VobSub tools for Windows to rip
subtitles from DVDs without converting them to text.
DVD subtitles are small images with four colours, so like Blu-ray
PGS they cannot be edited as text without optical
character recognition. The binary .sub file should not be confused with
the text MicroDVD format, which uses the same
extension.
Structure
The .idx file is text. It begins with a comment line naming the VobSub
index version, then settings such as the picture size, the 16-colour
palette in hexadecimal and the language of each track
(id: en, index: 0). Each subtitle then has a line giving its time and its
byte position in the .sub file.
The .sub file is an MPEG-2 program stream holding only the DVD subpicture
packets, in private stream 1, as they were stored in the disc’s VOB files.
# VobSub index file, v7 (do not modify this line!)
size: 720x576
palette: 000000, f0f0f0, cccccc, 999999, …
id: en, index: 0
timestamp: 00:00:01:000, filepos: 000000000
timestamp: 00:00:04:000, filepos: 000000800
Also used for
- MicroDVD subtitles .sub
Links
Software
- Subtitle Edit, which converts VobSub to text by OCR (Windows, Linux)
- MKVToolNix, which adds and extracts VobSub tracks (Windows, macOS, Linux)
- VLC media player (Windows, macOS, Linux, mobile)
- mpv (Windows, macOS, Linux)
- FFmpeg (Windows, macOS, Linux)
- BDSup2Sub, which converts and resizes VobSub and PGS subtitles
Developers
- libavformat, C, FFmpeg’s container library, which reads VobSub pairs