7.8. Extracting DVD subtitles to Vobsub file
Prev | Chapter 7. Encoding with MEncoder | Next

## 7.8. Extracting DVD subtitles to Vobsub file

MEncoder is capable of extracting subtitles from a DVD into Vobsub formatted files. They consist of a pair of files ending in `.idx` and `.sub` and are usually packaged in a single `.rar` archive. MPlayer can play these with the `-vobsub` and `-vobsubid` options.

You specify the basename (i.e without the `.idx` or `.sub` extension) of the output files with `-vobsubout` and the index for this subtitle in the resulting files with `-vobsuboutindex`.

If the input is not from a DVD you should use `-ifo` to indicate the `.ifo` file needed to construct the resulting `.idx` file.

If the input is not from a DVD and you do not have the `.ifo` file you will need to use the `-vobsubid` option to let it know what language id to put in the `.idx` file.

Each run will append the running subtitle if the `.idx` and `.sub` files already exist. So you should remove any before starting.

Example 7.2. Copying two subtitles from a DVD while doing 3-pass encoding

    rm subtitles.idx subtitles.sub
    mencoder dvd://1 -vobsubout subtitles -vobsuboutindex 0 -sid 2 -o frameno.avi -ovc frameno
    mencoder dvd://1 -oac copy -ovc divx4 -pass 1
    mencoder dvd://1 -oac copy -ovc divx4 -pass 2 -vobsubout subtitles -vobsuboutindex 1 -sid 5

Example 7.3. Copying a french subtitle from an MPEG file

    rm subtitles.idx subtitles.sub
    mencoder movie.mpg -ifo movie.ifo -vobsubout subtitles -vobsuboutindex 0 -vobsuboutid fr -sid 1

Prev | Up | Next
7.7. Encoding from multiple input image files (JPEGs,PNGs or TGAs) | Home | 7.9. Preserving aspect ratio