Usage Command line MPlayer utilizes a complex playtree. It consists of global options written as first, for example mplayer -vfm 5 and options written after filenames, that apply only to the given filename/URL/whatever, for example: mplayer -vfm 5 movie1.avi movie2.avi -vfm 4 You can group filenames/URLs together using { and }. It's useful with option : 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 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 -cd-rom-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 Control MPlayer has a fully configurable, command driven, control layer which lets you control MPlayer with keyboard, mouse, joystick or remote control (using LIRC). See the man page for the complete list of keyboard controls. Controls configuration MPlayer allows you bind any key/button to any MPlayer command using a simple config file. The syntax consist of a key name followed by a command. The default config file location is $HOME/.mplayer/input.conf but it can be overridden using the option (relative path are relative to $HOME/.mplayer). A simple input control file ## ## MPlayer input control file ## RIGHT seek +10 LEFT seek -10 - audio_delay 0.100 + audio_delay -0.100 q quit > pt_step 1 < pt_step -1 ENTER pt_step 1 1 Key names You can have a full list by running mplayer -input keylist. Keyboard Any printable character SPACE ENTER TAB CTRL BS DEL INS HOME END PGUP PGDWN ESC RIGHT LEFT UP DOWN Mouse (only supported under X) MOUSE_BTN0 (Left button) MOUSE_BTN1 (Right button) MOUSE_BTN2 (Middle button) MOUSE_BTN3 (Wheel) MOUSE_BTN4 (Wheel) ... MOUSE_BTN9 Joystick (support must be enabled at compile time) JOY_RIGHT or JOY_AXIS0_PLUS JOY_LEFT or JOY_AXIS0_MINUS JOY_UP or JOY_AXIS1_MINUS JOY_DOWN or JOY_AXIS1_PLUS JOY_AXIS2_PLUS JOY_AXIS2_MINUS ... JOY_AXIS9_PLUS JOY_AXIS9_MINUS Commands You can have a full list of known commands by running mplayer -input cmdlist. seek (int) val [(int) type=0] Seek to some place in the movie. Type 0 is a relative seek of +/- val seconds. Type 1 seek to val % in the movie. audio_delay (float) val Adjust the audio delay of val seconds quit Quit MPlayer pause Pause/unpause the playback grap_frames Somebody know ? pt_step (int) val [(int) force=0] Go to next/previous entry in playtree. Val sign tell the direction. If no other entry is available in the given direction it won't do anything unless force is non 0. pt_up_step (int) val [(int) force=0] Like pt_step but it jump to next/previous in the parent list. It's useful to break inner loop in the playtree. alt_src_step (int) val When more than one source is available it select the next/previous one (only supported by asx playlist). sub_delay (float) val [(int) abs=0] Adjust the subtitles delay of +/- val seconds or set it to val seconds when abs is non zero. osd [(int) level=-1] Toggle osd mode or set it to level when level > 0. volume (int) dir Increase/decrease volume contrast (int) val [(int) abs=0] brightness (int) val [(int) abs=0] hue (int) val [(int) abs=0] saturation (int) val [(int) abs=0] Set/Adjust video parameters. Val range from -100 to 100. frame_drop [(int) type=-1] Toggle/Set frame dropping mode. sub_visibility Adjust subtitles visibility. sub_pos (int) val Adjust subtitles position. vobsub_lang Change the language of VobSub subtitles. vo_fullscreen Switch fullscreen mode. vo_ontop Toggle stay-on-top. Supported by drivers which use X11, except SDL, as well as directx and gl2 under Windows. tv_step_channel (int) dir Select next/previous tv channel. tv_step_norm Change TV norm. tv_step_chanlist Change channel list. gui_loadfile gui_loadsubtitle gui_about gui_play gui_stop gui_playlist gui_preferences gui_skinbrowser GUI actions Control from LIRC Linux Infrared Remote Control - use an easy to build home-brewn IR-receiver, an (almost) arbitrary remote control and control your linux box with it! More about it at www.lirc.org. If you have installed the lirc-package, configure will autodetect it. If everything went fine, MPlayer will print a message like "Setting up lirc support..." on startup. If an error occurs it will tell you. If it doesn't tell you anything about LIRC there's no support compiled in. That's it :-) The application name for MPlayer is - oh wonder - mplayer. You can use any mplayer commands and even pass more than one command by separating them with \n. Don't forget to enable the repeat flag in .lircrc when it make sense (seek, volume, etc). Here's an excerpt from my .lircrc: begin button = VOLUME_PLUS prog = mplayer config = volume 1 repeat = 1 end begin button = VOLUME_MINUS prog = mplayer config = volume -1 repeat = 1 end begin button = CD_PLAY prog = mplayer config = pause end begin button = CD_STOP prog = mplayer config = seek 0 1\npause end If you don't like the standard location for the lirc-config file (~/.lircrc) use the switch to specify another file. Slave mode The slave mode allow you to build simple frontend to MPlayer. When enabled (with the option) MPlayer will read commands separated by new line (\n) from stdin. Streaming from network or pipes MPlayer can play files from network, using the HTTP, FTP, MMS or RTSP/RTP protocol. Playing goes by simply using adding the URL to the command line. MPlayer also honors the http_proxy environment variable, and uses proxy if available. Proxy usage can also be forced: mplayer http_proxy://proxy.micorsops.com:3128/http://micorsops.com:80/stream.asf MPlayer can read from stdin (not named pipes). This can be for example used to play from FTP: wget ftp://micorsops.com/something.avi -O - | mplayer - Note: it's also recommended to enable when playback from network: wget ftp://micorsops.com/something.avi -O - | mplayer -cache 8192 - Remote streams Remote streams allow you to access most MPlayer stream type from a remote host. The main purpose of this feature is to make it possible to directly use the CD or DVD drive of another computer on the network (provided you have the required bandwidth). On the downside some stream type (currently TV and MF) are not usable remotely because they are implemented at the demuxer level. It's sad for MF but TV stream would anyway require an insane amount of bandwidth. Compiling the server After having compiled MPlayer go to the TOOLS/netstream directory and enter make to build the server binary. You can then copy the netstream binary to the right place on your system (usually /usr/local/bin on Linux). Using remote streams First you have to start the server on the computer you intend to remotely access. Currently the server is very basic and doesn't have any commands line arguments so just enter netstream. Now you can for example play the second track of a VCD on the server with : mplayer -cache 5000 mpst://servername/vcd://2 You can also access files on this server : mplayer -cache 5000 mpst://servername//usr/local/movies/lol.avi Note that paths which aren't starting with a / will be relative to the directory where the server is running. The option is not needed but highly recommended. Be aware that currently the server is not secure at all. So don't complain about the numerous exploits which are possible through this. Instead send some (good) patch to make it better or start writing your own server.