Difference between revisions of "MPlayer"

From ArchWiki
Jump to navigation Jump to search
m (Firefox)
Line 45: Line 45:
<code>pacman -S mplayer-plugin</code>
pacman -S mplayer-plugin
<code>pacman -S gecko-mediaplayer</code>
pacman -S gecko-mediaplayer

Revision as of 06:09, 27 October 2009

Template:I18n links start Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n entry Template:I18n links end

MPlayer is the oh-so-popular movie player for Linux. MPlayer has support for pretty much every video and audio format out there and is hence very versatile, even though most people use it for viewing videos.


Type pacman -S mplayer in a shell as root.

Install the lates version from git with multithread ffmpeg support

Template:Box Note

Install git:

sudo pacman -S git

Create a directory for the source files then clone the git repo:

git clone git://repo.or.cz/mplayer-build.git

Follow the README in the mplayer-build directory.

Additional installation tips

More codecs

To get the most out of MPlayer, you should really consider installing the codecs package, which adds support for Windows codecs, Real9 and QuickTime (.mov).

Install it with: pacman -S codecs. [Note: this package is no longer in the repository; see http://bbs.archlinux.org/viewtopic.php?id=73230].


There are several GUIs for MPlayer.

  • Qt: smplayer is in the extra repository. The smplayer-themes package provides themes for it.
  • Gtk+: pymp and gnome-mplayer are in the AUR and community repos, respectively.
  • gmplayer: this gui is no longer included in the mplayer package. There is an alternative mplayer package (mplayer-x) in AUR in which the gmplayer gui is enabled.

Browser integration

If you want to let MPlayer control video viewing in your favorite web browser, try one of the following:


pacman -S mplayer-plugin


pacman -S gecko-mediaplayer


pacman -S kmplayer (also provides a complete frontend to MPlayer.)



System-wide configuration is located in /etc/mplayer/mplayer.conf, whereas the user-local settings are stored in ~/.mplayer/config. The file /etc/mplayer/example.conf is a good starting point, and here is an example:

#profile for up-mixing two channels audio to six channels
# use -profile 2chto6ch to activate

#profile to down-mixing six channels audio to two channels
# use -profile 6chto2ch to activate

#default configuration that applies to every file
#use X11 for video output
#use also for audio output
#prefere using six channels audio
channels = 6
#scale the subtitles to the 3% of the screen size
subfont-text-scale = 3
#never use font config
nofontconfig = 1
#add black borders so the movies have the same aspect ratio of the monitor
#change if your monitor is not 16/9

Translucent Video with radeon and Composite enabled

To get translucent video output in X you have to enable textured video in mplayer:

mplayer -vo xv:adaptor=1 <File>

Or add the following line to ~/.mplayer/config:


You can use xvinfo to check which video modes your graphic card supports.

Transparent SMPlayer in Gnome with Composite enabled

Have you noticed the transparent screen of smplayer when you are using compiz and maybe cairo-dock? Well it’s ridiculous that when you open your videos using SMplayer you can just hear audio and no video! Here’s how you fix this: [copy paste into terminal]

   sudo bash -c “cat > /usr/bin/smplayer.helper” <<EOF
   exec smplayer.real “\$@”
   sudo chmod 755 /usr/bin/smplayer.helper
   sudo mv /usr/bin/smplayer{,.real}
   sudo ln -sf smplayer.helper /usr/bin/smplayer

If you don’t use sudo then just use “su” to login as root and do the above!

Watching streamed video

If you want to play a video stream (e.g *.asx link) use mplayer -playlist linktostream.asx to play the stream as these are playlists of streams and won't be playable omitting the -playlist option.

Stream mplayer audio to jackd

Edit ~/.mplayer/config add:



This is a list of the most basic MPlayer keys.
Key Description
p Toggle pause/play.
Space Toggle pause/play.
Left Seek backward ten seconds.
Right Seek forward ten seconds.
Down Seek backward one minute.
Up Seek forward one minute.
< Go back in the playlist.
> Go forward in the playlist.
m Mute the sound.
0 Volume up.
9 Volume down.
f Toggle fullscreen mode.
o Toggle OSD state.
j Toggle subtitle visibility.
I Show filename.
1, 2 Adjust contrast.
3, 4 Adjust brightness.

Mplayer fails to open files with spaces

If you try to open a file with spaces (The Movie) and mplayer fails, saying that it could not open the file (file:///The%20Movie), where all spaces are converted to %20, then open


and change the line

Exec=mplayer %U


Exec=mplayer %F

If you got frontend/GUI enter GUI name in Exec=GUI name %F.

External links