In this entry I am going to go through the steps, which are needed for building the latest mplayer and gmplayer from their source codes. I am also going to show how to easily create .deb packages when using a distribution coming from the Debian family (Debian,Ubuntu, Linux Mint etc.) The steps below are done within a terminal client.
If you are using distributions that is not related to Debian family then compiling and installing follows the simple pattern of ./configure && make && sudo make install
You can pass some options to the configure line, which appear under the section CONFIGURE_FLAGS = \ (see below for a full example). A short example: ./configure – – enable-gui
If you need any help with the configure line execute ./configure – – help for a full options listing.
Important. There should be no space between – – markings (this is a WordPress related problem, which shows the markings incorrectly).
1. Create a directory for source code and cd into it.
mkdir mplayer && cd mplayer
2. Make sure all the dependencies are installed.
sudo apt-get install git-svn
sudo apt-get build-dep mplayer
3. Fetch mplayer sources. Fetching creates additional mplayer subdirectory.
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
4. Cd into the newly created directory mplayer and modify the rules file found inside the debian subdirectory.
The file controls how the mplayer will be built. If you want to build it with a gui (gmplayer) add – -enable-gui \ to the rules file. See below for an example. Reminder. There should be no space between – – markings (this is a WordPress related problem, which shows the markings incorrectly).
CONFIGURE_FLAGS = \
– -prefix=/usr \
– -confdir=/etc/mplayer \
– -enable-xvmc \
– -enable-menu \
– -enable-radio –enable-radio-capture \
– -disable-arts \
– -language=all \
– -enable-gui \
Note. Using libdvdcss might impose legal issues in some countries, like USA. If you choose to disable the internal libdvdcss that comes with mplayer add – -disable-libdvdcss-internal \ to CONFIGURE_FLAGS.
Once you are done tweaking the rules file then you need to build the debian package. Inside the debian folder you can find a file called daily-build.sh . Open a terminal and execute the daily-build.sh file in it and the compilation should start. An example:
On the above we throw the full path of the daily-build.sh script to the terminal. On the example tester is a username.
Once mplayer is done building then you should have the following debian binaries available in the parent mplayer directory:
mplayer-dbg_1.0~svn37204_i386.deb = Dpkg files
mplayer-doc_1.0~svn37204_all.deb = Documentation
mplayer-gui_1.0~svn37204_i386.deb = gmlayer (mplayer gui)
mplayer_1.0~svn37204_i386.deb = mplayer (the non-gui client)
If you want to use mplayer only within a terminal then you would install only the non-gui client.
If you want a gui with mplayer install gmplayer as well.
Note. When you install gmplayer you will get an error saying mplayer-skin-blue is missing. Do not be alarmed by it – even as it finishes the installation with an error. The error is easily fixed afterwards by executing as a root or a sudo:
apt-get -f install
The above command fetches the mplayer-skin-blue from Debian repositories and installs it along with the the mplayer and gmplayer we built earlier.
When all is done you can execute mplayer with mplayer command and gmplayer with gmplayer command.
Adding more skins to gmplayer.
Since the default skin might get boring, you can get new skins for gmplayer from: http://www.mplayerhq.hu/design7/dload.html
Download the skins you want and decompress the archives. Once the decompressing is done move the skin folders to /usr/share/mplayer/skins directory as a root or a sudo.
An example: sudo mv /home/tester/Downloads/darker-skin /usr/share/mplayer/skins
When the above is done any new skin should be installed. You will more than likely need to restart gmplayer before you can see and apply some new skins via gmplayer skin browser.