Gentoo Wiki




MPlayer is a very powerful video and audio player for GNU/Linux that can play almost every audio/video file in almost any known format.

A big problem of many *nix users that use multimedia off the internet is the fact that many browsers do not support even the simplest type of media playback, save for Macromedia Flash.

In this tutorial, you will be guided through the installation of mplayerplug-in.


If you do not need the Mozilla Firefox, remove the USE flag firefox from mplayerplug-in:

echo "net-www/mplayerplug-in -firefox" >> /etc/portage/package.use

There are a few other USE variables for mplayerplug-in available. For example, if you want to be able to play Windows Media files, add the wmp USE flag. You might also want to add support for other media formats:

File: /etc/portage/package.use
net-www/mplayerplug-in divx quicktime realmedia wmp

Then make sure, you have no browsers running in the background and emerge mplayerplug-in:

emerge -va mplayerplug-in

Mozilla Firefox

Note: TODO: Are these steps still required since net-www/mplayerplug-in-3.50 is now shipped with Mozilla Firefox?

If you are using Netscape, no further steps are required. If you are using Mozilla Firefox or Mozilla, you will need to copy the mplayer plugin to your plugin directory:

Switch from being user root to yourself for the next step!

su - <username>

Make the plugin directory if this has not already been done, and copy the plugin object:

mkdir $HOME/.mozilla/plugins
cp /usr/lib/nsbrowser/plugins/ $HOME/.mozilla/plugins

If you don't like the idea of copying the file, a symlink does just as well. After creating the directory:

ln -s /usr/lib/nsbrowser/plugins/ $HOME/.mozilla/plugins/


Open your browser and point it to about:plugins. If the installation was successful, you will see mplayerplug-in listed supporting a variety of codecs. Surf to a page with video to try it out, like GameSpot.

Click on a video, and the plugin should kick in, and start buffering. The playback will start a few seconds later.

MPlayer plugin has the same keyboard commands as MPlayer, including pressing the f key, for full screen playback. Yes it works, even though you are in a web browser!

Warning: If this tutorial crashes your Adobe Flash playback (notably: no sound and playback for only 5 seconds), then recompiling Mozilla Flash support should solve it. See Adobe Flash for further information.


Currently, the 64-bit Mozilla Firefox has no problems with mplayerplug-in and the MPlayer (using net-www/mplayerplug-in, media-video/mplayer, and www-client/mozilla-firefox).

Compile mplayerplug-in manually from source with firefox-bin and xulrunner-bin

grab mplayerplug-in from HERE

emerge xulrunner-bin
emerge mozilla-firefox-bin

untar mplayerplug-in arball configure mplayerplug-in with the following command:

GECKO_IDLDIR=/opt/xulrunner/idl/ PATH=$PATH:/opt/xulrunner/ ./configure --with-gecko-sdk=/opt/xulrunner/ --enable-{wmp,qt,rm,gmp,dvx}

then compile:

make all

after the compilation stage, copy the .xpt files into ~/.mozilla/components/, and the .so files into ~/.mozilla/plugins/


configure: error: Unable to find mozilla or firefox development files

See [1] for a solution.

See also

Retrieved from ""

Last modified: Wed, 20 Aug 2008 11:30:00 +0000 Hits: 33,056