Sunday, January 2, 2011

Building mplayer on Debian Linux

MPlayer is one of my favorite media players. It is used with such frontend as smplayer, gnome-mplayer or MPlayerGUI to provide a good alternative to Windows Media Player and VLC. First, I installed the necessary compiler toolchain.



  • autoconf
  • automake
  • binutils
  • bison
  • cpp
  • g77 or fort77
  • gcc
  • gettext
  • g++
  • libtool
  • make


Next, I installed the necessary development libraries:



  • libasound2-dev
  • libbz2-dev
  • libesd0-dev
  • libfontconfig1-dev
  • libfribidi-dev
  • libjpeg62-dev
  • libncurses5-dev
  • libpng12-dev
  • libxv-dev


Some useful libraries are not included in the Debian distribution, so I had to compile them on my own. They are faac, lame, libdca, live, x264 and xvidcore. First, I built liblzo.



tar xzvf /usr/src/lzo-2.04.tar.gz
cd lzo-2.04/
./configure --prefix /usr
make
make install


Then, I built the giflib.



tar xjvf /usr/src/giflib-4.1.6.tar.bz2
cd giflib-4.1.6/
ls
./configure --build=i586-pc-linux-gnu --prefix=/usr --disable-shared
make
make install


I built cdparanoia.



tar xzvf /usr/src/cdparanoia-III-10.2.src.tgz
cd cdparanoia-III-10.2/
./configure --build=i586-pc-linux-gnu --prefix=/usr --disable-shared
make
make install


I compiled libdca in the following way:



tar xjvf libdca-0.0.5.tar.bz2
cd libdca-0.0.5/
./configure --build=i586-pc-linux-gnu --prefix=/usr --disable-shared
make
make install


I built ogg, vorbis, theora and speex.



./configure --build=i586-pc-linux-gnu --prefix=/usr --disable-shared
make
make install


To compile lame, run:



tar xzvf /usr/src/lame-3.98.4.tar.gz

cd lame-3.98.4/

./configure --build=i586-pc-linux-gnu --prefix=/usr --disable-shared --mandir=/usr/share/man --enable-expopt=full --enable-nasm

make

make install


Unpack live555 source in /usr/lib and compile live555 as follows:



cd /usr/lib/live

./genMakefiles linux

make


To compile x264, do:



tar xjvf /usr/src/x264-snapshot-20110102-2245.tar.bz2

cd x264-snapshot-20110102-2245/

sh configure --host=i586-pc-linux-gnu --prefix=/usr --enable-pic --disable-asm

make

make install


Compile the xvid library as follows:


cd xvidcore/build/generic

./configure --build=i586-pc-linux-gnu --prefix=/usr

make

make install


Finally, you're ready to compile MPlayer. Get the latest snapshot tarball and extract it:



wget ftp://ftp.mplayerhq.hu/MPlayer/releases/mplayer-export-snapshot.tar.bz2

tar xjvf mplayer-export-snapshot.tar.bz2

cd mplayer-export-2009-05-29

CPPFLAGS='-DLIBTWOLAME_STATIC' ./configure --prefix=/usr --enable-runtime-cpudetection --yasm=/usr/bin/yasm --language=all --confdir=/etc/mplayer

make

make install

chmod 4755 /usr/bin/mplayer

No comments:

Post a Comment

About This Blog

KBlog logo This blog is about current events and issues concerning general population. Thanks for visiting the blog and posting your comments.

© Contents by KBlog

© Blogger template by Emporium Digital 2008

Followers

Total Pageviews

icon
Powered By Blogger