3.1. Command line
上一页 | 第 3 章 Usage | 下一页

## 3.1. Command line

MPlayer utilizes a complex playtree. Options passed on the command line can apply to all files/URLs or just to specific ones depending on their position. For example

    mplayer -vfm ffmpeg movie1.avi movie2.avi

will use FFmpeg decoders for both files, but

    mplayer -vfm ffmpeg movie1.avi movie2.avi -vfm dmo

will play the second file with a DMO decoder.

You can group filenames/URLs together using `{` and `}`. It is useful with option `-loop`:

    mplayer { 1.avi -loop 2 2.avi } -loop 3

The above command will play files in this order: 1, 1, 2, 1, 1, 2, 1, 1, 2.

Playing a file:

    mplayer [options] [path/]filename

Another way to play a file:

    mplayer [options] file:///uri-escaped-path

Playing more files:

    mplayer [default options] [path/]filename1 [options for filename1] filename2 [options for filename2] ...

Playing VCD:

    mplayer [options] vcd://trackno [-cdrom-device /dev/cdrom]

Playing DVD:

    mplayer [options] dvd://titleno [-dvd-device /dev/dvd]

Playing from the WWW:

    mplayer [options] http://site.com/file.asf

(playlists can be used, too)

Playing from RTSP:

    mplayer [options] rtsp://server.example.com/streamName

Examples:

    mplayer -vo x11 /mnt/Films/Contact/contact2.mpg
    mplayer vcd://2 -cdrom-device /dev/hdc
    mplayer -afm 3 /mnt/DVDtrailers/alien4.vob
    mplayer dvd://1 -dvd-device /dev/hdc
    mplayer -abs 65536 -delay -0.4 -nobps ~/movies/test.avi

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