LinuxTECH.NET
advertisement
  Home    |     News    |     Reviews    |     Features    |     Tips+Tricks    |     Downloads    |     Contact Us  
 

How To Build Uoti's git MPlayer Branch on Linux

mplayer logo
step by step instructions for Ubuntu and Mandriva Linux

Uoti Urpala, one of the core developers of mplayer, maintains a forked branch of mplayer that contains a lot of interesting patches that are not (yet) included in the main svn repository. His branch is often referred to as the 'git branch' on forums, since it's kept in a git code repository (http://repo.or.cz/w/mplayer.git).
Some of the features included in Uoti's branch are multithreading (which enables mplayer to take advantage of multi core cpus), Matroska (mkv) ordered chapters, better SSA/ASS subtitle support, improved VDPAU support, and other improvements.

Build Instructions

First part: install the build environment

Ubuntu specific (tested on Ubuntu 9.10 32bit):
Run the following commands in a console/terminal window consecutively.

Download and install mplayer build dependencies:
sudo apt-get build-dep mplayer-nogui
Install further required development packages:
sudo apt-get install git-core autoconf libtool

Mandriva specific (tested on Mandriva 2010.0 32bit):
Run the following commands in a console/terminal window consecutively as 'root' user.

Download the Mandriva mplayer source RPM as reference for build dependencies:
wget http://bit.ly/d86Z4L
Download and install mplayer build dependencies:
urpmi --buildrequires mplayer*.src.rpm
When asked to select one out of a choice of dependencies always enter '1'

Install further required development packages:
urpmi git-core autoconf libtool make automake

Second part: get and build the mplayer git source

Run the following commands in a console/terminal window as normal user (not 'root').
Download the mplayer git build scripts:
git clone git://repo.or.cz/mplayer-build.git
cd mplayer-build/
Enable multi threading patches:
./enable-mt
Download mplayer and related libraries source code
./init --shallow
Build mplayer
make
Once 'make' has completed successfully, you have a freshly built git mplayer executable available in the mplayer/ sub-directory, ready to use.
Test it (adjust the numer of threads to match the cores of your cpu):
./mplayer/mplayer -lavdopts threads=4 /path/to/some/movie-file.mkv

Once you have tested the freshly build mplayer executable, you could put it into '/usr/local/bin' and make sure your PATH is set to search '/usr/local/bin' before '/usr/bin' so that when you call mplayer, the git version will be used by default.

References:
Uoti's post on the mplayer mailing list describing his git branch:
http://lists.mplayerhq.hu/pipermail/mplayer-users/2009-December/078440.html



You might also be interested in the following articles:

[04/Apr/2010 - art-how_to_build_uotis_git_mplayer_branch]