Install ffmpeg on Ubuntu 10.04

Note: These are my instructions for installing ffmpeg on ubuntu linux 10.04 server (lts). Most of the code here can be found on ubuntu forums also and probably you will find more stuff there.

Install requisite packages

sudo apt-get update
sudo apt-get install build-essential git-core checkinstall texi2html libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libvorbis-dev libx11-dev libxfixes-dev zlib1g-dev automake autoconf libxvidcore-dev

Install latest version of yasm

cd
git clone git://github.com/yasm/yasm.git
cd yasm
sh autogen.sh
make
sudo checkinstall --pkgname=yasm --pkgversion="1.1.0" --backup=no --deldoc=yes --default

Install x264

cd
git clone git://git.videolan.org/x264
cd x264
./configure
make
sudo checkinstall --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`-0.0ubuntu1" --backup=no --deldoc=yes --fstrans=no --install=yes --default

Install LAME for mp3 support

cd
sudo apt-get install nasm
wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.tar.gz
tar xzvf lame-3.99.tar.gz
cd lame-3.99
./configure
make
sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.99" --backup=no --default --deldoc=yes

Install opencore-amr for amr support

cd
wget http://downloads.sourceforge.net/project/opencore-amr/vo-amrwbenc/vo-amrwbenc-0.1.1.tar.gz
tar zxvf vo-amrwbenc-0.1.1.tar.gz
cd vo-amrwbenc-0.1.1
./configure --disable-shared
make
sudo checkinstall --pkgname="libopencore-amr" --pkgversion="0.1.1" --backup=no --fstrans=no --install=yes --default

Install libtheora for ogg support

cd
wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2
tar jxvf libtheora-1.1.1.tar.bz2
cd libtheora-1.1.1
./configure --disable-shared
make
sudo checkinstall --pkgname=libtheora --pkgversion "1.1.1" --backup=no --fstrans=no --install=yes --default

Install faac

cd
sudo apt-get install unzip
wget http://downloads.sourceforge.net/faac/faac-1.28.tar.gz
tar zxvf faac-1.28.zip
cd faac-1.28
wget http://www.linuxfromscratch.org/patches/blfs/svn/faac-1.28-glibc_fixes-1.patch
patch -Np1 -i faac-1.28-glibc_fixes-1.patch
sed -i -e '/obj-type/d' -e '/Long Term/d' frontend/main.c
make
sudo checkinstall --pkgname=libfaac --pkgversion "1.28" --backup=no --fstrans=no --install=yes --default

Install FFmpeg

svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion "0.8.5" --backup=no --fstrans=no --install=yes --default