Handbrake has stable builds for Windows, Mac, Ubuntu and Fedora. The developers of Handbrake haven’t made a stable release for quite some time, leaving the latest version at 0.9.4. While this generic version is good enough for most people, generally it’s better to build Handbrake yourself, on your computer for best results. The official PPA is only for Karmic Koala (9.10), and though packages are meant to be forward-compatible, the interface doesn’t work in Lucid (10.04) at all. Hunter Kaller’s PPA has a proper Lucid build, but for most installations, the video output is garbled. Where does that leave us? A build from the trunk.
To compile our own copy of Handbrake, we must obtain the source code from the Subversion repository. If you don’t have Subversion (the default install doesn’t), install it from the Ubuntu repositories:
sudo apt-get install subversion
To download the source code, you must run Subversion in a terminal:
svn checkout svn://svn.handbrake.fr/HandBrake/trunk hb-trunk
Before we compile Handbrake, we must install some dependant packages – without knowing and installing these, the compile process will stop again and again until we install all the packages one at a time:
sudo apt-get install yasm build-essential
autoconf libtool zlib1g-dev libbz2-dev intltool libglib2.0-dev
libdbus-glib-1-dev libgtk2.0-dev libhal-dev libhal-storage-dev
libwebkit-dev libnotify-dev libgstreamer0.10-dev
After changing to hb-trunk, run the configure script:
The configuring process should take less than two seconds (but don’t worry if it takes longer; only worry if there are errors printed). Ignore the message that “lipo” and “xcodebuild” are not found; they are for Mac OS X builds only. Now we can build Handbrake. It is always best to compile using as many concurrent build processes as you have cores, so the make command will now look like:
where X is the number of cores you have in your computer. To build Handbrake, change into build and run make:
If you see weird output and you’re using a j value higher than 1, don’t be alarmed; it’s just that the processes are all fighting over stdout so some output gets mixed. This may take five minutes to half an hour, depending on your computer’s processing speed. On my Intel Q9650, it took around five to ten minutes. Unless you see errors at the end of the output (in which case they should be fixed before moving on), you’re ready to install Handbrake! Make sure that any copy of Handbrake from a repository is uninstalled first:
sudo apt-get purge ^handbrake.*$
Finally, run sudo make install to install Handbrake. Congratulations! If all went well, you should be able to run /usr/local/bin/ghb or find Handbrake in Applications > Sound & Video and Handbrake should launch! If all didn’t go well, The build docs may be able to solve your problem. Check it out; it has helped me many times before.