Installing MPlayer on Fedora Core 3
Updated: 6/8/05
Especially if you are a web developer like me, having video capability is no longer optional. My priorities were to be able to play most of the commonly used video formats found on websites, as well as having the ability to play the occasional DVD when I'm on the road. After a little bit of research, it looked like I should install MPlayer.
The installation detailed below took place on a ThinkPad T41 running Fedora Core 3. It also assumes that you have already installed RealPlayer10 according to the instructions here.
1. Install MPlayer.
For performance reasons, I decided to build my own RPMs from source RPMs. Instructions on working with SRPMs are here. I got my SRPMs at FreshRPMs. Because of dependencies, I had to break up the install into three stages.
First, download, rebuild, and install the following packages:
- aalib
- id3lib (needed by faad2 below)
- imlib2 (needed by libcaca below)
- libdvdread
- libdvdcss (needed by libdvdread)
- libebml (needed by libmatroska below)
- libfame
- libmad
- libsndfile (needed by faad2 below)
- libXvMCW
- lzo
- xvidcore
Second, now that you have some dependencies covered, download, rebuild and install these packages:
- faad2
- libcaca
- libmatroska
Third, now that all the libraries are installed, download, rebuild and install the mplayer packages. When rebuilding mplayer itself, use the —without lirc option (unless you plan on using an infrared remote).
- mplayer
- mplayer-skins
- mplayer-fonts
At this point, you should be able to play DVDs (albeit without menu support), but not do much else. Time to get some codecs.
2. Install codecs.
Go to the MPlayer website and download the appropriate codec package. I chose the essential package.
Create the directory /usr/local/lib/codecs, and unpack all your codes into this directory. They must reside in that directory itself, not in a sub-directory. It appears that MPlayer expects the Windows codecs to live in /usr/lib/win32, so create a symlink: ln -s /usr/local/lib/codecs /usr/lib/win32.
At this point, you should be able to play most video formats from local files on disk. Next, we need to get video playback working for online resources.
3. Get video working in Firefox.
For this, you need the mplayerplug-in RPM. I got the SRPM here. Before this would rebuild, I needed to add the following line to my ~/.rpmmacros file:
%atrelease() %1.rhfc3.at
After installing the plugin, restart Firefox and it should just work. Just to make sure, I tested the following online videos:
The results were good, but not perfect.
- Windows Media: This link is meant to spawn the player and display the video in that. Instead, a blank browser window opened up, and the video successfully played in that browser window. Controls were at the bottom of the window.
- Real: This link is also meant to spawn a player. Instead, a dialog popped up asking if Totem should open this file. However, copying the link then opening RealPlayer and having it play that URL worked just fine.
- QuickTime: Video played inside the page as it was supposed to without a problem.
4. Adjustments when using a second monitor.
After getting a docking station and external monitor for my ThinkPad laptop, I noticed that video played in either mplayer itself or in Firefox via the mplayerplug-in would result in a blue screen — audio would work, but there would be no video. To solve this problem, edit ~/.mplayer/config and /etc/mplayerplug-in.conf and add the line vo=x11.
Conclusion.
MPlayer doesn't seem like the most stable video application — it has crashed on me several times already. But it seems good enough for what I need it to, and I haven't found anything better. Good luck.