he following is the HOWTO for installing Mplayer from source:
[Edited and Updated]
MPlayer
-------
It's time to grab all of the packages needed to install MPlayer. MPlayer
is the most versatile media player available for GNU/Linux - video, audio,
X, no X - it very well may be the only player you'll need. Let's start with
gcc/g++ and other dependencies, and then grab the MPlayer source.
$ sudo apt-get install manpages-dev
$ sudo apt-get install autoconf
$ sudo apt-get install automake
$ sudo apt-get install libtool
$ sudo apt-get install flex
$ sudo apt-get install bison
$ sudo apt-get install gcc-doc
$ sudo apt-get install g++
$ sudo apt-get install x-window-system-dev
$ sudo apt-get install libgtk1.2-dev
$ sudo apt-get install libpng-dev
$ sudo apt-get install libasound2-dev
$ sudo apt-get install libxv-dev
$ sudo apt-get install libxxf86vm-dev
You may wanna try and install the above packages (with all dependencies) from synaptic by searching for them in case u run into problems with the command line apt.
Have your Hoary CD handy and accept any extra packages, e.g. the
libtool install will also install gcc. We'll use a US mirror for (most of)
the MPlayer packages and assume you're working in your home directory.
Download MPlayer, codecs, English fonts and the default blue skin.
Internationalization and slick graphics are up to you.
$ wget
http://ftp5.mplayerhq.hu/mplayer/releases/MPlayer-1.0pre7.tar.bz2
$ wget
http://ftp5.mplayerhq.hu/mplayer/releases/codecs/essential-20050412.tar.bz2
$ wget
http://ftp5.mplayerhq.hu/mplayer/releases/fonts/font-arial-iso-8859-7.tar.bz2
$ wget
http://ftp5.mplayerhq.hu/mplayer/Skin/Blue-1.4.tar.bz2
If you want really slick and jazzy skins u can check out:
http://www.mplayerhq.hu/homepage/design6/dload.html#Skins
Now lets install the essential windows codecs which will help mplayer support various video formats.
$ tar -xjf essential-20050412.tar.bz2
$ sudo mkdir -p /usr/lib/win32
$ sudo cp essential-20050412/* /usr/lib/win32/
Time to compile MPlayer. Issue these commands.
$ tar -xjf MPlayer-1.0pre7.tar.bz2
$ cd MPlayer-1.0pre7
$ ./configure --enable-gui
$ make
$ sudo make install
Now install the fonts and skin.
$ cd
$ tar -xjf font-arial-iso-8859-7.tar.bz2
$ sudo cp font-arial-iso-8859-7/font-arial-14-iso-8859-7/* /usr/local/share/mplayer/font/
$ tar -xjf Blue-1.4.tar.bz2
$ sudo mkdir -p /usr/local/share/mplayer/Skin/default
$ sudo cp -r Blue/* /usr/local/share/mplayer/Skin/default/
Finally, copy over the included conf files.
$ sudo cp MPlayer-1.0pre7/etc/* /usr/local/etc/mplayer/
Test your install by launching the graphical version of MPlayer.
$ gmplayer
QuickTime, WindowsMedia, MPEG, avi - you should be able to play just about
anything. You should find an entry of "MPlayer" (which actually is gmplayer and not the command line based mplayer) in Gnome Menu--> Audio and Video.
Playing DVDs
------------
To add DVD playback capability to Ubuntu, use your favorite
text editor and add the "ubuntuforums backports (http://ubuntuguide.org/#extrarepositories)" repositories to your /etc/apt/sources.list file if it is not there already.
Then sync your package index and grab the infamous DeCSS.
$ sudo apt-get libdvdread
$ sudo apt-get install libdvdcss2
Please Note: Mplayer does not have DVD menu support. Xine does have it. I personally recommend totem-xine and xine for dvd playback.
Also Note: If u get the following error while compiling mplayer:
/usr/lib/libGL.a(glxcmds.o)(.text+0x2fc1): In function `glXGetMscRateOML':
: undefined reference to `XF86VidModeQueryVersion'
/usr/lib/libGL.a(glxcmds.o)(.text+0x2ffd): In function `glXGetMscRateOML':
: undefined reference to `XF86VidModeGetModeLine'
collect2: ld returned 1 exit status
do the following from terminal and compile mplayer again:
sudo apt-get install libxxf86vm-dev
Good Luck!