![]() |
(on Wikipedia)
https://mplayerhq.hu/
Pretty much the de-facto video player on Linux, as it comes with most Linux distributions. It can play both audio and video, and works at the commandline.
Although it's great, it's a last resort compared to other audio playing software.
Although it can play without one, the common frontends are:
- gMPlayer (GTK+) is the official frontend.
- SMPlayer (Qt) is my preferred frontend.
-
MEncoder is one of it's tools.
-
TODO - explore Edit Decision Lists (EDL) to bookmark the insides of files!
--
- 2016-04-03 - phonon-mplayer-1b1fd1f_20110823git-i486-1 on Slackware 14.1 32bit
- 2016-03-26 - 2.0-701-gd4c5b7f-2ubuntu2 on Lubuntu 14.04.4 LTS
- 2009-12-31 - SVN-0.rc4.0.r29964.1-4.4.1 on Unity Linux 64bit-beta1
- SVN-r29347-4.4.0 on Unity Linux 0.99-alpha2
- 2009-04-18 - 1.0rc2-4.1.1 on PCLinuxOS 2007
Usage notes ∞
- command names:
mplayer -input cmdlist
- key names:
mplayer -input keylist
- Hotkeys
- For playing DVDs, it was reported that
mplayer -nocache dvdnav://
is better thandvd://
to play "new movies". -
For widescreen: 1920x1200, 1280x800, 1440x900 or other 16:10 resolution, edit
~/.mplayer/config
and add the linemonitoraspect=16:10
Double size works like so:
mplayer -vo x11 -zoom -loop 0 -fsmode 0 -xy 2 "%s"
Full screen works like so:
mplayer -vo x11 -zoom -loop 0 -fsmode 0 "%s"
Seeking in a broken/incomplete AVI ∞
This starts mplayer way faster:
\mplayer -demuxer lavf
Resizing ruins the aspect ratio ∞
Go to properties, and change the video driver to x11
. Some people say to use gl
, but that's slow for me.
I eventually switched it back to xv
because x11
seems to run slower and slower with multiple videos. Boo.
Fixing audio sync ∞
One of these will work..
mplayer -autosync 30 -mc 2.0 <filename> mplayer -autosync 0 -mc 0 <filename>
Set autoloop ∞
In one of:
/etc/mplayer/mplayer.conf
~/.mplayer/config
loop = 0
Sigh, why isn't this a default? =/
Limiting optical drive speeds (to reduce noise) ∞
See Quiet computing
Playing video at the true console (TTY) ∞
http://www.mplayerhq.hu/DOCS/HTML/en/vidix.html#vidix-nvidia
Not really known.. it messes up for me.
Another try was a success:
mplayer -vo fbdev2 -xy 2 -fs video.avi
fbdev
was a bit slow.- Stuff like
-xy 1920
would not work. - The above combination with
-zoom
wouldn't work. So I use-xy 2
to double up the screen. Fractions don't work, but this happened to be good with my test video. - This test was perfectly smooth as compared to the
xv
I had been using before. -
fbdev2
would have the background bleed through, so I switched to console 8 (alt-F8).- With gpm, the mouse would always appear so I would move it to the middle and the video would overwrite it.
- Click in the middle to have the mouse highlight block appear there instead and it'll get hidden too.
- The cursor would be at the top-left, but after some time the console screen saver would kick in and hide it. The video would continue playing normally.
2009-12-31 - SVN-0.rc4.0.r29964.1-4.4.1 ∞
-
Resizing honours the aspect ratio now..
SVN-r29347-4.4.0 ∞
-
Resizing does not honour the aspect ratio. I have no clue how to fix this.
2009-04-18 - 1.0rc2-4.1.1 ∞
Configuration ∞
/etc/mplayerplug-in.conf
Several options are not sane. =/
Spoiler
# Enable debugging if set to 1 (default=0) debug=0 # File to write debug info to logfile=$HOME/tmp/mplayerplug-in.log # Video output vo=x11 # Audio output ao=esd,alsa,oss,arts,null # Passes display to show output to, useful for multiple monitor setups #display=[display name] # Tells mplayer to allow default video post processing or not (default=0) # novop=1 # Pass special video post processing #vopopt=[mplayer vop options] # Option for rtsp streams, set to 1 when behind proxy (default=0) #rtsp-use-tcp=1 # OSD Level (default=0) osdlevel=0 # When set to 1 uses the aspect of movie no matter what (default=1) prefer-aspect=1 # If set to 1, forces mplayer to be in it's own window (default=0) noembed=1 # Where to store the downloaded movies dload-dir=$HOME/tmp # Download file before playing (default=0) #download=1 # Set to 1 if you want to keep downloaded media (default=0) #keep-download=1 # Cache Size in kB. This is the buffer size before the video plays (default=512) cachesize=1024 # Percent of file to load into cache (default=25) #cache-percent=10 # Read mime types to handle from $HOME/{.mplayer,.mozilla},/etc/mplayerplug-in.types use-mimetypes=0 # Set QT Speeed, use "low" for dialup, "med" (default) for DSL, "high" for more #qt-speed=low # Enable/Disable Mpeg mime-types (default=1) #enable-mpeg=0 # Enable/Disable Ogg mime-types (default=1) #enable-ogg=0 # Enable/Disable Smil (default=1) #enable-smil=0 # Enable/Disable Helix compatibility (not allowing nphelix.so to handle it's # own mime types (default=1) enable-helix=0 # For Live.com video behind a proxy #rtsp-use-tcp=0 # Black background #black-background=0 # Disable media cache #nomediacache=0 # Skip displaying some frames framedrop=1 # Gradually adjusts the A/V sync based on audio delay measurements autosync=1 # Maximum A-V sync correction per frame # mc=1 # User-Agent #user-agent=NSPlayer # Disable mouse button press/release input #nomouseinput=0 # Disable reading key events from standard input #noconsolecontrols=1 # Send cookies when making HTTP request #cookies=1 # Pause Video when hidden nopauseonhide=1
Customizing hotkeys ∞
-
key names:
mplayer -input keylist
The defaults ∞
Spoiler
<- and -> Seek backward/forward 10 seconds. up and down Seek forward/backward 1 minute. pgup and pgdown Seek forward/backward 10 minutes. [ and ] Decrease/increase current playback speed by 10%. { and } Halve/double current playback speed. backspace Reset playback speed to normal. < and > Go backward/forward in the playlist. ENTER Go forward in the playlist, even over the end. HOME and END next/previous playtree entry in the parent list INS and DEL (ASX playlist only) next/previous alternative source. p / SPACE Pause (pressing again unpauses). . Step forward. Pressing once will pause movie, every con‐ secutive press will play one frame and then go into pause mode again (any other key unpauses). q / ESC Stop playing and quit. + and - Adjust audio delay by +/- 0.1 seconds. / and * Decrease/increase volume. 9 and 0 Decrease/increase volume. ( and ) Adjust audio balance in favor of left/right channel. m Mute sound. _ (MPEG-TS, AVI and libavformat only) Cycle through the available video tracks. # (DVD, MPEG, Matroska, AVI and libavformat only) Cycle through the available audio tracks. TAB (MPEG-TS only) Cycle through the available programs. f Toggle fullscreen (also see -fs). T Toggle stay-on-top (also see -ontop). w and e Decrease/increase pan-and-scan range. o Toggle OSD states: none / seek / seek + timer / seek + timer + total time. d Toggle frame dropping states: none / skip display / skip decoding (see -framedrop and -hardframedrop). v Toggle subtitle visibility. j Cycle through the available subtitles. y and g Step forward/backward in the subtitle list. F Toggle displaying "forced subtitles". a Toggle subtitle alignment: top / middle / bottom. x and z Adjust subtitle delay by +/- 0.1 seconds. r and t Move subtitles up/down. i (-edlout mode only) Set start or end of an EDL skip and write it out to the given file. s (-vf screenshot only) Take a screenshot. S (-vf screenshot only) Start/stop taking screenshots. I Show filename on the OSD. ! and @ Seek to the beginning of the previous/next chapter. D (-vo xvmc, -vf yadif, -vf kerndeint only) Activate/deactivate deinterlacer. (The following keys are valid only when using a hardware accel‐ erated video output (xv, (x)vidix, (x)mga, etc), the software equalizer (-vf eq or -vf eq2) or hue filter (-vf hue).) 1 and 2 Adjust contrast. 3 and 4 Adjust brightness. 5 and 6 Adjust hue. 7 and 8 Adjust saturation. (The following keys are valid only when using the quartz or ma‐ cosx video output driver.) command + 0 Resize movie window to half its original size. command + 1 Resize movie window to its original size. command + 2 Resize movie window to double its original size. command + f Toggle fullscreen (also see -fs). command + [ and command + ] Set movie window alpha. (The following keys are valid only when using the sdl video out‐ put driver.) c Cycle through available fullscreen modes. n Restore original mode. (The following keys are valid if you have a keyboard with multi‐ media keys.) PAUSE Pause. STOP Stop playing and quit. PREVIOUS and NEXT Seek backward/forward 1 minute. (The following keys are only valid if GUI support is compiled in and will take precedence over the keys defined above.) ENTER Start playing. ESC Stop playing. l Load file. t Load subtitle. c Open skin browser. p Open playlist. r Open preferences. (The following keys are only valid if you compiled with TV or DVB input support and will take precedence over the keys defined above.) h and k Select previous/next channel. n Change norm. u Change channel list. (The following keys are only valid if you compiled with dvdnav support: They are used to navigate the menus.) keypad 8 Select button up. keypad 2 Select button down. keypad 4 Select button left. keypad 6 Select button right. keypad 5 Return to main menu. keypad 7 Return to nearest menu (the order of preference is: chap‐ ter->title->root). keypad ENTER Confirm choice. (The following keys are only valid if teletext support is en‐ abled during compilation: They are used for controlling TV tele‐ text.) X Switch teletext on/off. Q and W Go to next/prev teletext page. mouse control button 3 and button 4 Seek backward/forward 1 minute. button 5 and button 6 Decrease/increase volume. joystick control left and right Seek backward/forward 10 seconds. up and down Seek forward/backward 1 minute. button 1 Pause. button 2 Toggle OSD states: none / seek / seek + timer / seek + timer + total time. button 3 and button 4 Decrease/increase volume.
a failed attempt ∞
- shortcuts are inconsistent and shitty.
- I have no idea how to use control, shift, alt or win. Nobody else does either.
- I don't know how to bind single keys
-
Half of what I try won't work..
~/.mplayer/input.conf
Spoiler
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
Spoiler
SPACE pause RIGHT seek +5 LEFT seek -5 BS seek -5 # CTRL_BS seek -30 # CTRL_LEFT seek -30 # CTRL_RIGHT seek +30 # control-shift-left - skip lots # control-shift-right - skip lots PGDWN seek_chapter +1 PGUP seek_chapter -1 v volume -1 V volume +1 - volume -1 + volume +1 m mute # CTRL_- panscan +1 # CTRL_+ panscan -1 UP speed_set 1 DOWN speed_set -1 # CTRL-o open # CTRL_q quit # CTRL_c screenshot PLAY gui_play PAUSE pause PLAYPAUSE pause STOP qui_stop FORWARD seek +5 REWIND seek -5 NEXT seek_chapter +1 PREV seek_chapter -1 VOLUME_UP volume +1 VOLUME_DOWN volume -1 MUTE mute XF86_PAUSE pause XF86_STOP gui_stop XF86_PREV seek_chapter -1 XF86_NEXT seek_chapter +1 CLOSE_WIN exit
(date unknown) ∞
-
mplayer -vo x11 -loop 0 %1
x11
is default-vo vesa
will allow the resizer, however this mode fucks everything over. DO NOT LOOP with this mode. (use-xy 2
to double, etc..)
- Cannot properly have filenames with spaces used here. I've no idea why.. sigh.
-
Cannot have brackets
(
and)
)- Though
[
and]
are ok.
- Though
- mplayer DOES work with spaces, and my file manager also worked with spaces, but the two together broke. How odd..
-
I can't get things scaled up.. properly.. sigh
- I think I tried
-vo svga
- I think I tried
Last updated 2022-06-05 at 18:51:06
ported