3.2. Subtitles and OSD
上一页 | 第 3 章 Usage | 下一页

## 3.2. Subtitles and OSD

MPlayer can display subtitles along with movie files. Currently the following formats are supported:

- VOBsub

- OGM

- CC (closed caption)

- MicroDVD

- SubRip

- SubViewer

- Sami

- VPlayer

- RT

- SSA

- PJS (Phoenix Japanimation Society)

- MPsub

- AQTitle

- JACOsub

MPlayer can dump the previously listed subtitle formats (except the three first) into the following destination formats, with the given options:

- MPsub: `-dumpmpsub`

- SubRip: `-dumpsrtsub`

- MicroDVD: `-dumpmicrodvdsub`

- JACOsub: `-dumpjacosub`

- Sami: `-dumpsami`

MEncoder can dump DVD subtitles into VOBsub format.

The command line options differ slightly for the different formats:

VOBsub subtitles. VOBsub subtitles consist of a big (some megabytes) `.SUB` file, and optional `.IDX` and/or `.IFO` files. If you have files like ``sample.sub``, ``sample.ifo`` (optional), ``sample.idx`` - you have to pass MPlayer the `-vobsub sample [-vobsubid `id`]` options (full path optional). The `-vobsubid` option is like `-sid` for DVDs, you can choose between subtitle tracks (languages) with it. In case that `-vobsubid` is omitted, MPlayer will try to use the languages given by the `-slang` option and fall back to the `langidx` in the `.IDX` file to set the subtitle language. If it fails, there will be no subtitles.

Other subtitles. The other formats consist of a single text file containing timing, placement and text information. Usage: If you have a file like ``sample.txt``, you have to pass the option `-sub `sample.txt`` (full path optional).

Adjusting subtitle timing and placement:

`-subdelay `sec``

  Delays subtitles by ``sec`` seconds. Can be negative. The value is added to movie's time position counter.

`-subfps `RATE``

  Specify frame/sec rate of subtitle file (float number).

`-subpos `0-100``

  Specify the position of subtitles.

If you experience a growing delay between the movie and the subtitles when using a MicroDVD subtitle file, most likely the framerate of the movie and the subtitle file are different. Please note that the MicroDVD subtitle format uses absolute frame numbers for its timing, but there is no fps information in it, and therefore the `-subfps` option should be used with this format. If you like to solve this problem permanently, you have to manually convert the subtitle file framerate. MPlayer can do this conversion for you:

    mplayer -dumpmicrodvdsub -fps subtitles_fps -subfps avi_fps \
        -sub subtitle_filename dummy.avi

About DVD subtitles, read the DVD section.

上一页 | 上一级 | 下一页
3.1. Command line | 起始页 | 3.3. Control