Ubuntu / Linux news and application reviews.

A while ago I posted some fixed ffmpeg and x264 packages for Ubuntu Jaunty (.deb) but you may want to upgrade to the latest version of ffmpeg and x264 (whichever the latest version is). So this how-to will explain how to install the latest FFmpeg and x264 and then how to always update those packages. Read on!

Getting the Dependencies
1. Uninstall x264, libx264-dev, and ffmpeg if they are already installed. Open a terminal and run the following:
sudo apt-get purge 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):
sudo apt-get update && sudo apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libsdl1.2-dev libtheora-dev libx11-dev libxvidcore4-dev zlib1g-dev

Install x264
3. Get the most current source files from the official x264 git repository, compile, and install. You can run "./configure --help" to see what features you can enable/disable. If you are behind a firewall or unable to use git, then daily source tarballs are also available.
cd
git clone git://git.videolan.org/x264.git
cd x264
./configure
make
sudo checkinstall --fstrans=no --install=yes --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`-0.0ubuntu1" --default

Install FFmpeg
4. Get the most current source files from the official FFmpeg svn, compile, and install. Run "./configure --help" to see what features you can enable/disable. If you are behind a firewall or unable to use subversion, then nightly FFmpeg snapshots are also available.
cd
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
make
sudo checkinstall --fstrans=no --install=yes --pkgname=ffmpeg --pkgversion "3:0.svn`date +%Y%m%d`-12ubuntu3" --default
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" below for more details.

Additionally, you can download these .DEB files which I created just moments ago:


But using the above steps, you can always update your packages so that's the recommended way of upgrading FFmpeg and x264!

Using FFmpeg
Audio / video encoding guide
FFmpeg cheat sheet
Or you can automate this using the Audio / Video / Image / Text / ISO Converter Nautilus Script

Updating Your Installation
You may eventually want to update to the newest revisions of FFmpeg and x264 if there are any major developments or changes:
sudo apt-get purge ffmpeg x264
cd ~/x264
make distclean
git pull
./configure
make
sudo checkinstall --fstrans=no --install=yes --pkgname=x264 --pkgversion "1:0.svn`date +%Y%m%d`-0.0ubuntu1" --default
cd ~/ffmpeg
make distclean
svn update
./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora --enable-libx264 --enable-libxvid --enable-x11grab
make
sudo checkinstall --fstrans=no --install=yes --pkgname=ffmpeg --pkgversion "3:0.svn`date +%Y%m%d`-12ubuntu3" --default

Reverting Changes Made by This Tutorial
To remove FFmpeg/x264 and any changes made from this tutorial:
sudo apt-get purge x264 ffmpeg build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libsdl1.2-dev libtheora-dev libx11-dev libxvidcore4-dev zlib1g-dev

Lastly, delete the ffmpeg and x264 directories in your home folder and if you want, install ffmpeg and x264 from Ubuntu repo.

[Credits: FakeOutdoorsman user @ ubuntuforums.org]