Ubuntu / Linux news and application reviews.

ffmpeg version

FFmpeg is a complete solution to record, convert and stream audio and video from the command line. As you probably know, the FFmpeg version from the official Ubuntu repositories is compiled without support for some codecs so if you want to use them, you must compile FFmpeg for yourself.

NicoLargo (who has an awasome blog by the way) has created two scripts based on a post from the Ubuntuforums (which we've quoted several times before) to automate the process of compiling FFmpeg in Ubuntu 9.10 Karmic Koala and Ubuntu 10.04 Lucid Lynx.

Why 2 scripts? Because one is for installing (compiling FFmpeg) and the second one is for updating it.

Basically all you have to do is run the script (and have an active Internet connection) and it will automatically download the latest SVN version of FFmpeg, compile it, create a .deb package with checkinstall and install it. The script will also download and compile the x264 library required by FFmpeg.

Download the FFmpeg installation / update script and how to use it

You don't even have to install the dependencies for yourself, the script will do everything for you.

To download and run the FFmpeg installation script (works for both Ubuntu 9.10 and 10.04), simply paste this in a terminal:
wget http://svn.nicolargo.com/ubuntupostinstall/trunk/ffmpeginstall.sh
chmod +x ffmpeginstall.sh

You will be asked for your password for some of the steps in the script, but that's all the required interaction from your side, the rest is done automatically.

If you want to upgrade FFmpeg (and/or x264) later on, simply use the second script. You can download and run it by a simple copy & paste of the commands below:
wget http://svn.nicolargo.com/ubuntupostinstall/trunk/ffmpegupdate.sh
chmod +x ffmpegupdate.sh

I just used the script a few moments ago in Ubuntu 10.04 Lucid Lynx and everything went flawlessly, and I now have the latest FFmpeg as you can see in the screenshot in the beginning of the post.

Reverting the changes made by the script

So you want to remove everything installed by this script? That's easy, simply paste this in a terminal:
sudo apt-get remove x264 ffmpeg build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libfaad-dev libmp3lame-dev libsdl1.2-dev libtheora-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev

Then, install the original FFmpeg and x264 using the following command:
sudo apt-get install ffmpeg x264

Credits (and many thanks!) for the install / upgrade FFmpeg script: NicoLagro