Mplayer revisited

33

Author:

– by Joe Barr
It’s been almost two years since I wrote about Mplayer, an open source movie player for Linux and other platforms. Rereading that story today, I see I was wrong when I predicted that Mplayer’s popularity wouldn’t last. It continues to rank as the most popular project on freshmeat.net. I recently downloaded pre-release 1 of Mplayer 1.0 to see how much things have changed, if at all, since then. What I found is that while some things have changed, others have not.

In December of 2001, Mplayer had the rep of playing more codecs than any other movie player for Linux. The list of codecs – both audio and video – that it supports today is quite impressive. And if you add the mplayerplug-in you can leverage Mplayer’s repertoire and play the most popular video formats used online in Mozilla, Galeon, Netscape, and maybe Opera, too.

Mplayer also had the rep of being a tough install and of being even tougher on users – noobs or not – who were having problems with the install. In fact, I used a comment from a frustrated user posting on freshmeat.net for the title of my first article and called it “Mplayer: the project from hell.” Let’s start with the install issue first and save the other for last.

Buried deep in the Mplayer documentation> – in the section on installation – are a few lines of text that make the process seem completely trivial. They read as follows:

Features:

* Decide if you need GUI. If you do, see the GUI section before compiling.
* If you want to install MEncoder (our great all-purpose encoder), see the MEncoder section.
* If you have a V4L compatible TV tuner card, and wish to watch/grab and encode movies with MPlayer, read the TV input section.
* There is a neat OSD Menu support ready to be used. Check the OSD Menu section.

Then build MPlayer:

./configure
make
make install

At this point, MPlayer is ready to use. The $PREFIX/etc/mplayer/codecs.conf file is needed only when you want to change its properties, as the main binary contains an internal copy of it.

Actually, there is a little more to it than that. And a lot of reading in those docs is highly recommended before you begin. Here’s how I installed Mplayer from the pre-1 1.0 source code on Red Hat 9.0 running Ximian Desktop 2.

I began by going through the list of requirements and making sure that I had not just each app noted, but an acceptable release of each. Except for gcc, that is. I ignored the rants and held steady with gcc-3.2.2-5 shipped by Red Hat.

Then I was ready to download: I grabbed mplayer-1.0pre1 and the codecs I thought I needed plus a skin or two from the downloads page on the Mplayer site. I created an mplayer directory in my home directory, then used bunzip2 to decompress each of the downloads and then ran tar, which unpacked them and stowed them away in their own directories. For neatness, I created a separate tar directory and moved the tar files themselves there afterwards.

Then I entered the mplayer-1.0pre1 subdirectory tar had created and ran the configure script with the gui option: ./configure --enable-gui.
The script ran, but it complained about not having found a Win32 codecs directory, among a long list (more than 50 items) of other things.

I had downloaded the Win32 codecs, but they were needed in a directory I didn’t have. No problem. I changed to su, created a /usr/local/lib/codecs directory, and moved the win32codecs directory there. Then I ran the configure script again. This time there was no complaint about missing Win32 codecs.

Then I went through the configure.log and checked every one of the 50 items it had noted as deficient or missing. None of them were critical. Many didn’t even apply to me as they were for different platforms completely. So I started make and took a break.

I came back about 15 minutes later and found make had completed successfully. I ran make install as root, then exited to my normal user and typed gmplayer. Out spewed 50 lines or so of activity and complaints about missing files and directories. The killer seemed to be the default skin, which Mplayer couldn’t find.

After rereading the pertinent section of the docs a few times, I tried moving the skin directory (named Blue) to a new name of “default” instead of moving it into a directory named default. This time it worked. Well, except for the error message you see on the startup screen in the adjacent image which was whining about text fonts.

I went back to the mplayer site and downloaded one of the font packages, decompressed and untarred it, then copied the contents of the directory holding the fonts of the size I chose into ~/.mplayer/font/. When I restarted mplayer, there were no complaints at all.

Then it was time to exercise the beast. The first thing I tried was an MPG file I created last year with MainActor. It looked and sounded just fine. Then I tried a video file I had downloaded some time ago but had never been able to view in xine or other movie players. It was a Microsoft commercial for Xbox that had briefly drawn some notoriety in Europe. No problem playing it, either.

I downloaded the latest mplayerplug-in from SourceForge (there was an RPM for RH 9 available at the project site) and installed it. It was time to surf. First up, CNN. I requested a news video and told the CNN site that I preferred the Real format. No luck. The sniffer script detected that I was running Linux and offered to let me download RealPlayer 8. I declined the offer, which still wouldn’t have allowed me to view RealOne streaming format.

When I lied and said I preferred the Windows Media Player, it worked without question. Strange, that. I surfed over to ZDNet and watched Patrick Houston interview the Palm Tungsten product manager. Very smooth video and sound.

Then I went to MSNBC, where I tried the same deception. No joy. It ran, but the video was hugely pixilated, looking more like a short documentary on cubism than a news reel. I made the Mplayer binary SUID and that helped. And after swapping my 1 GHz Athlon for an Athlon XP 2000+ 1.67 GHz chip the next day in an upgrade completely unrelated to the Mplayer review, it worked even better. At times the video now pixelates, but it always manages to resync.

It would take weeks to fully explore all of Mplayer’s tricks and features, so I will let someone else do that another time. The bottom line is that is seems to handle just about everything out there.

I would have to say that there have been improvements in the number of features, in performance, and in documentation. It’s still not the easiest install in the world, especially for newbies, but it’s a little better than it used to be.

Reading through the comments on freshmeat.net, it seems that the Mplayer installation still draws the most flamage. From my experience installing it two years ago and this time, not much has been done to fix the problems at first-run time. Needed files may or may not be on hand, but the install script still does not create the needed directories and put the files in their proper places.

But more importantly, I didn’t notice any recent comments about user abuse.
I think I deserve some of the credit for that, even if I do say so myself. Arpi and the rest of the project team must feel that way too, because they have taken care to remember me in a special section of the documentation included in the tarball. Like I said at the start, some things haven’t changed at all.

Joe Barr has been writing about personal computing for 10 years, and about Linux for five. His work has appeared in IBM Personal Systems Journal, LinuxGazette, LinuxWorld, Newsforge, phrack, SecurityFocus, LinuxJournal.com, and VARLinux.org. He is the founder of The Dweebspeak Primer, home of the official newsletter of the Linux Liberation Army, an organization in which he holds the honorary rank of Corporal-for-life.