mplayer is *the* movie player for Linux. It is the holy grail for multimedia applications, as it can be used for DVDs, Quicktime movies, Windows Media Files, MPEG files, etc., etc., etc. It simply works, and it is the only application that you really need to watch and encode streaming media. mplayer is available in several repositories, and has matured significantly over the past couple of years that I feel confident in using livna to install it, as outlined very nicely by Mauriat Miranda. Mauriat's notes are much more complete than those presented here, so if you have a problem, I suggest surfing over to his website.
Please note that you need to have the RPM Fusion repository enabled to install mplayer. We will be installing the command line interface, the GUI, an encoding tool called mencoder, and a web plugin in addition to the necessary codecs.
1. Install Proper Codecs
Install Mplayer through yum:
~>
sudo yum install mplayer mplayer-gui gecko-mediaplayer mencoder
lsdvd ffmpeg-libs
Press 'y'
when asked to install the packages and any dependencies.Please note that mencoder is optional, but provides many encoding functions, gecko-mediaplayer is a replacement for mplayerplug-in, lsdvd is a program to list the contents of a DVD, and ffmpeg-libs provide audio libraries. For additional notes, see Mauriat Miranda's website.
2. Install libdvdcss for DVD playback
For DVD playback, we need to also install the libdvdcss package, which, unfortunately, is the one package that did not make it over to RPM Fusion from Livna (probably as a result of legal reasons due the country where the RPM Fusion server is located). Go to the following webpage:
Click on the i386 link, followed by the libdvdcss-1.2.9-5.lvn9.i386.rpm file. Once downloaded, use rpm to install it:
~>
sudo rpm -vhi ~/Download/libdvdcss-1.2.9-5.lvn9.i386.rpm
DVD playback should now be enabled.3. Install Win32 Codecs
Please note thate are some additional codecs available on mplayer's website that are used to read formats that do not have an open source decoder. These include Win32 codecs for Windows Media, Quicktime, Real, etc. Go to:
Click on the all-20071007.tar.bz2 link, which is the latest version of the codecs (at the time of this writing). Next, create a directory to install the Win32 codecs under /usr/lib/codecs:
~>
sudo mkdir -p /usr/lib/codecs
Then untar the codecs into the directory: ~> sudo tar vfjx
~/Download/all-20071007.tar.bz2 --strip-components 1 -C /usr/lib/codecs/
The Win32 codecs
are now installed on your
system.4. mplayer Skins
In install some skins for the GUI, go to:
Scroll down, and you will eventually come to the mplayer skin section. The skins are required if you want to have a GUI for mplayer. You will need at least one skin. I typically download the BlueHeart, proton, and PowerPlayer skins, with the PowerPlayer being my preferred choice. At the time of this writing, the latest versions are BlueHeart-1.5.tar.bz2, proton-1.2.tar.bz2, and PowerPlayer-1.1.tar.bz2.
The On Screen Display (OSD) and Subtitles need to have fonts properly installed. To do this, setup a symlink from one of your msttcorefonts fonts, assuming you have installed them (if not, see the MSFonts page):
~> ln
-s /usr/share/fonts/msttcore/arial.ttf
~/.mplayer/subfont.tff
To install the skins, copy the
source tarballs you downloaded into the appropriate directory: ~> sudo cp
~/Download/BlueHeart-1.5.tar.bz2
/usr/share/mplayer/skins/.
~> sudo cp ~/Download/PowerPlayer-1.1.tar.bz2 /usr/share/mplayer/skins/.
~> sudo cp ~/Download/proton-1.2.tar.bz2 /usr/share/mplayer/skins/.
Change into the skins
directory:~> sudo cp ~/Download/PowerPlayer-1.1.tar.bz2 /usr/share/mplayer/skins/.
~> sudo cp ~/Download/proton-1.2.tar.bz2 /usr/share/mplayer/skins/.
~>
cd /usr/share/mplayer/skins
and decompress the source
files (again using the 'j'
option): ~> sudo tar vfjx
BlueHeart-1.5.tar.bz2
~> sudo tar vfjx PowerPlayer-1.1.tar.bz2
~> sudo tar vfjx proton-1.2.tar.bz2
Once the package has been
decompressed, delete the source files:~> sudo tar vfjx PowerPlayer-1.1.tar.bz2
~> sudo tar vfjx proton-1.2.tar.bz2
~>
sudo rm *.bz2
And finally,
choose one of the skins to be
your default. This can be done by creating a softlink from the
directories to "default": ~> sudo rm default
~> sudo ln -s PowerPlayer default
With that, mplayer
is
finally ready for use. To launch the graphical version, type
the following in a terminal window:~> sudo ln -s PowerPlayer default
~>
gmplayer
To test the plugin for Firefox, restart the application.4. Fix SELinux Issues
The package ffmpeg-libs can give SELinux denials. To fix this, type:
~> sudo chcon -t
textrel_shlib_t '/usr/lib/sse2/libpostproc.so.51.2.0'
~> sudo chcon -t textrel_shlib_t '/usr/lib/sse2/libswscale.so.0.6.1'
5. Remove the
totem-mozplugin~> sudo chcon -t textrel_shlib_t '/usr/lib/sse2/libswscale.so.0.6.1'
The crudy player (totem) that comes with Fedora 9 will still take precedence over the mplayer plugin in Firefox. To undo this, type:
~>
sudo yum remove totem-mozplugin
That's it. If you want to try it out, surf over to
Apple's
site, and take a look at their movie trailers (http://www.apple.com/trailers/).
Click on a trailer, and you should be able to watch it embedded
directly within the web page (assuming that it is not a QuickTime 7
file)! The more you use it, the more you
will realize just how powerful mplayer
really is.

