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 full reference is in Index file, Sub file and Subpicture unit.
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
Not described
Known, not yet covered
- Reference: the values of
smoothandaligncome from memory of the comments in VobSub’s own files; the VobSub source code would confirm them. - Viewer: there is no VobSub viewer plugin yet; the explorer shows the .idx as text and the .sub as bytes.
Also used for
- MicroDVD subtitles – Text subtitles timed in frames: start frame, end frame and text on one line.
Links
Software
- Subtitle Edit – free subtitle editor that converts VobSub to text by OCR (Windows, Linux)
- MKVToolNix – adds and extracts VobSub tracks in MKV files (Windows, macOS, Linux)
- VLC media player – free media player that shows VobSub subtitles next to the video (Windows, macOS, Linux, mobile)
- mpv – free, minimal media player that shows VobSub subtitles (Windows, macOS, Linux)
- FFmpeg – command-line tools that read VobSub and burn it into video (Windows, macOS, Linux)
- BDSup2Sub – converts and resizes VobSub and PGS subtitles
Developers
- libavformat – FFmpeg’s container library, which reads VobSub pairs (C)