Install FFmpeg and x264 on Ubuntu Karmic Koala 9.10
Karmic is unsupported and this guide will not be updated.
Get the Dependencies
1. Uninstall x264, libx264-dev, and ffmpeg if they are already installed. Open a terminal and run the following:
Code:
sudo apt-get remove ffmpeg x264 libx264-dev
2. Next, get all of the packages you will need to install FFmpeg and x264 (you may need to enable the universe and multiverse repositories):
Code:
sudo apt-get update
sudo apt-get install build-essential 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
Install x264
3. Get the current source files, compile, and install x264.
Code:
cd
git clone git://git.videolan.org/x264
cd x264
./configure --enable-static
make
sudo checkinstall --pkgname=x264 --pkgversion="1:0.svn$(date +%Y%m%d)+$(git rev-list \
HEAD -n 1 | head -c 7)" --backup=no --deldoc=yes --default
Install libvpx (optional)
4. This is used to encode and decode VP8 video. Add --enable-libvpx to the ./configure line in step 7 if you decide to install libvpx:
Code:
cd
git clone git://review.webmproject.org/libvpx
cd libvpx
./configure
make
sudo checkinstall --pkgname=libvpx --pkgversion="$(date +%Y%m%d%H%M)-git" --backup=no \
--deldoc=yes --default
Install libtheora (optional)
5. 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. Add --enable-libtheora to the ./configure line in step 7 if you decide to install libtheora.
Code:
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 --deldoc=yes \
--default
Install LAME (optional)
6. This is used to encode to mp3 audio. Once again, the repository version is too old. Add --enable-libmp3lame to the ./configure line in step 7 if you decide to install LAME:
Code:
sudo apt-get remove libmp3lame-dev
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 --disable-shared
make
sudo checkinstall --pkgname=lame-ffmpeg --pkgversion="3.98.4" --backup=no --deldoc=yes \
--default
Install FFmpeg
7. Get the most current source files, compile, and install FFmpeg.
Code:
cd
git clone git://git.videolan.org/ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc \
--enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb \
--enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab
make
sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(./version.sh)" --backup=no \
--deldoc=yes --default
hash x264 ffmpeg ffplay ffprobe ffserver
That's it for installation. You can keep the ~/x264 and ~/ffmpeg directories if you later want to update the source files to a new revision. See "Updating Your Installation" on the first page of this guide for more details.
Now head back to the FFmpeg guide for usage instructions and more.
Reverting Changes Made by This Guide
To remove FFmpeg/x264 and other packages added for this guide:
Code:
sudo apt-get autoremove x264 ffmpeg build-essential git-core checkinstall yasm \
texi2html libfaac-dev lame-ffmpeg libogg-dev libsdl1.2-dev libtheora libvorbis-dev \
libvpx libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev
Lastly, delete the ffmpeg, libtheora, libvpx, lame-3.98.4, and x264 directories in your home folder.
Bookmarks