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.
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 -input conf option (relative path are relative to $HOME/.mplayer).
3.1. példa - 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
You can have a full list by running mplayer -input keylist.
Keyboard
Mouse (only supported under X)
Joystick (support must be enabled at compile time)
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
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_skinbrowser
GUI actions
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 -lircconf filename switch to specify another file.