Install FFmpeg on Ubuntu
Actually it is very easy to install FFmpeg under Ubuntu with the apt-get command. Unfortunately, the default FFmpeg installation doesn't let you include the latest codecs which are needed by Razuna. Thus you have to compile FFmpeg yourself. Just follow the steps below. It is very easy!
Install the Dependencies
Uninstall x264, libx264-dev, and ffmpeg if they are already installed.
Next, get all of the packages you will need to install FFmpeg and x264 (you may need to enable the universe and multiverse repositories):
sudo apt-get update
Ubuntu 10.04 LTS
sudo apt-get install build-essential subversion git-core checkinstall texi2html \
libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev \
libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev libavcodec-dev
Ubuntu 9.10
sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html \
libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev \
libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev libavcodec-unstripped-52
Install x264
Get the most current source files, compile, and install. You can run "./configure --help" to see what additional features you can enable/disable.
Ubuntu 10.04 LTS
cd
git clone git://git.videolan.org/x264.git
cd x264
./configure --enable-static--disable-opencl
make
sudo checkinstall --pkgname=x264 --default--pkgversion="3:$(./version.sh | \
awk -F'[" ]''/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes
Ubuntu 9.10
cd
git clone git://git.videolan.org/x264.git
cd x264
./configure
make
sudo checkinstall --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`+`git rev-list HEAD -n 1 | head -c 7`"--backup=no --default
Troubleshooting
If the configure complains about nasm requiring version 1.x, then you need to download and build yasm with the latest build. Follow these intsructions to do so (each line is a command!):
sudo apt-get install build-essential checkinstall
sudo apt-get build-dep yasm
wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz && \
tar -xf yasm-1.2.0.tar.gz && cd yasm-1.2.0&& ./configure
make
sudo checkinstall --pakdir "$HOME/Desktop"--pkgname yasm --pkgversion 1.2.0\
--backup=no --default
Now try to configure X264 again.
Install libvpx
This is used to encode and decode VP8 video (WebM).
cd
git clone http://git.chromium.org/webm/libvpx.git
cd libvpx
./configure
make
sudo checkinstall --pkgname=libvpx --pkgversion="`date +%Y%m%d%H%M`-git"--backup=no \
--default--deldoc=yes
Install lame
Used for MP3.
sudo apt-get remove libmp3lame-dev
sudo apt-get install nasm
cd
wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz
tar xzvf lame-3.98.4.tar.gz
cd lame-3.98.4
./configure --enable-nasm --disable-shared
make
sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.98.4"--backup=no --default--deldoc=yes
Install libtheora (only needed on Ubuntu 9.10)
This is used to encode to Theora, the video type usually found in OGG/OGV files. The repository libtheora is too old, so it must be compiled.
sudo apt-get install libogg-dev
cd
wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz
tar xzvf libtheora-1.1.1.tar.gz
cd libtheora-1.1.1
./configure --disable-shared
make
sudo checkinstall --pkgname=libtheora --pkgversion "1.1.1"--backup=no --default
Install FFMpeg
Get the most current source files from the official FFmpeg SVN, compile, and install.
Ubuntu 10.04 LTS
cd
git clone git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
git checkout release/2.0
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \
--enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb \
--enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid \
--enable-x11grab --enable-libvpx --enable-libmp3lame
make
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(./version.sh)"--backup=no \
--deldoc=yes --default
hash x264 ffmpeg ffplay ffprobe
Ubuntu 9.10
cd
git clone git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
git checkout release/2.0
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion "4:0.5+svn`date +%Y%m%d`"--backup=no --default
hash x264 ffmpeg ffplay
Updating FFmpeg and x264
Development of FFmpeg and x264 is active and an occasional update can give you new features and bug fixes. To update FFmpeg and x264 you will need to remove the packages, make distclean, update the source, recompile, and install.
To update x264:
sudo apt-get remove ffmpeg x264 libx264-dev libvpx
cd ~/x264
make distclean
git pull
Now compile x264 as shown earlier in the guide starting with the x264 ./configure line. You can update libvpx if you installed that too:
cd ~/libvpx
make clean
git pull
Now continue with the installation starting with the libvpx ./configure line. Now update FFmpeg:
cd ~/ffmpeg
make distclean
git pull
Finish the installation starting with the FFmpeg ./configure line from above.