Setting up Media Plugins for Firefox on Linux

This is a short rant and solution to getting Windows(tm) media files to play from the browser on Linux.

A little background. I've recently updated to Mandriva 2006. All was well until, I tried to install Firefox. Trying to run it caused some whining about libraries. After installing missing parts, it just crashes. Oh well, so off I go grab source, configure, compile, all is well in the world. In the process of configuring, I try a few options, notably the risky qt version. No dice on building. I do get the GTK2 version to fly. Below are the options I set in my .mozconfig file. More detail on the config can be found at the Mozilla Developer center.

ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --disable-tests
ac_add_options --enable-default-toolkit=gtk2
ac_add_options --enable-application=browser 

The compile definitely took awhile (make coffee and have dinner kind of time frame). However, afterward, it worked great. I followed up with making the installer, just so I wouldn't have to go through a lot of pain in the install. Ran the installer, and moved the firefox directory into /usr/lib/. I then added the symlinks for the current plugins (java, flash, realplayer, etc...

So all was going well until, family decided that it should really work with all of those sites serving wmv media. Well, I figured, just install MozPlugger and the codecs and all would be good. Hahaha, no dice. By default, it hands most of that stuff off to mplayer. So, I try mplayer directly but, no love. I then try my other media players. No love from xine or totem either. But, Kaffeine worked great. So, I'm guessing its a network protocol issue (but, I'm probably wrong). So, time to learn how to configure MozPlugger.

Turns out the fine folks who put together MozPlugger also put together some good documentation. So, the first step, as always, is finding out where the config file is located. Running man mozplugger provided with the location and all of the config options. The actual file had some macros defined for the commands but, its was pretty straight forward in how to edit. A couple of important options were stream and adding the nofork to Kaffeine. The nofork option ensured that the Kaffeine process would stop when the browser no longer had the media plugin (closing window or navigation). This is because, like all media players on all OS's, Kaffeine can sometimes act flaky. A clean shutdown seems to make life better.

So, the only real downer is that the embed's still launch Kaffeine in its own window. I tried the kaffeine-mozilla package next. It works well with no configuration. Only problem, unlike mozplugger, I can't get controls to appear in the web browser. This isn't a real big deal, just a nice to have. It also leaves Kaffeine running if you close the browser. Some people would prefer this. So, I think I'll be going back to MozPlugger. Maybe I'll create a script to give the option to launch StreamRipper to ;-)


The configuration file for building Mozilla Firefox
My MozPlugger configuration file


Feel free to leave comments, insults, questions, or suggestions here.


About willCode4Beer