Repository navigation
Muxer VOBsub
vobsub writes DVD bitmap subtitles as a VOBsub pair: an .idx index and a .sub data file. It copies the bitmaps. It does not re-encode them.
Official FFmpeg can read VOBsub but cannot write it. This muxer is NoMercy-only.
Since: v1.0.30.
# Extract the first subtitle stream of a DVD rip. Writes output.idx and output.sub.
ffmpeg -i movie.mkv -map 0:s:0 -c:s copy output.idxGive the .idx name and the muxer is chosen from the extension. Give the .sub name and you must name the muxer:
ffmpeg -i movie.mkv -map 0:s:0 -c:s copy -f vobsub output.subEither way you get both files. The other file is opened next to the one you named.
The muxer has no options. ffmpeg -h muxer=vobsub of v1.0.47 shows:
| Property | Value |
|---|---|
| Extensions |
idx, sub
|
| MIME type | application/x-vobsub |
| Default subtitle codec | dvd_subtitle |
| File | Content |
|---|---|
.idx |
The line # VobSub index file, v7 (do not modify this line!), the size: line, langidx: 0, id: <language>, index: 0, and one timestamp: line with a filepos: per subtitle. |
.sub |
The subtitle packets in an MPEG-2 program stream (a pack and a PES packet for each). |
How the header is filled:
- If the stream carries extradata, it is copied into the
.idx. - Without extradata, the
size:line uses the stream's width and height, or 720x480 if they are unknown. - The language is the stream's
languagetag. It isundif there is none.
- Map one subtitle stream per output pair. The header is built from the first stream.
- The output name must end in
.idxor.sub. Any other name is an error. - One packet must fit in one PES packet, under about 64 KB. A bigger packet is an error.
A VOBsub pair is the usual input for OCR. To turn the bitmaps into text inside FFmpeg, see Subtitles-OCR.
The muxer is in every platform archive. This page was checked against the source and -h muxer=vobsub. A VOBsub extraction was not run in this documentation pass, because no DVD subtitle sample was at hand.
Users
Filters and components
- Filter-stemsplit
- Filter-lyricsalign
- Whisper-Language-Detection
- Whisper-Word-Timestamps
- Filter-trailingsilence
- Filter-keydetect
- Filter-beatdetect
- Filter-rubberband
- Muxer-Sprite-Sheet
- Muxer-Chapter-VTT
- Muxer-VOBsub
- Protocol-dvdread
- Protocol-OmniDrive
- Auto-Create-Directories
- AACS-and-BDplus
- HLS-Master-Playlist
- Subtitles-OCR
- HEVC-Alpha
Acceleration and codecs
Contributors