Dec 062010

Twice now I’ve downloaded, built and installed Handbrake 0.9.4 without any problems. Then when I try to re-encode a video, I’ve found that the “Start” button is grayed out and Handbrake isn’t actually working. Unfortunately, these two incidents were so far apart that I forgot the fix and had to start from scratch. I always assume it’s a library/dependency problem, but it’s not!

Since I use Gentoo and Handbrake isn’t in the main portage tree, I’ve just built in from source. The problem is, there seems to be a bug/incompatibility in the 0.9.4 tarball. You’ll find a fair number of people trying to find workarounds if you Google a bit, and a lot of them are messing with installing dependencies and downgrading library versions. But Handbrake is a bit odd (and sometimes shunned) because it pulls down and statically links most of its dependencies. It turns out that if you pull the source straight from SVN, it’s quite stable. It builds fine and runs well.

All I had to do was:

svn co svn:// HandBrake
cd HandBrake/
cd build/
sudo make install

Once this is done, you’ll find HandBrakeCLI installed in /usr/local/bin. At first, I was quite confused about running HandBrake in GUI mode and assumed that it hadn’t even been built. This seems to be a common source of confusion because the developers chose to name the GUI executable ghb. I find it a lot easier to also run:

sudo ln -s /usr/local/bin/ghb /usr/local/bin/HandBrakeGUI

  One Response to “Installing Handbrake from Source”

Comments (1)
  1. Of course, building from Handbrake’s subversion trunk wasn’t working today! Thankfully, there is now a working Handbrake ebuild available on the Gentoo forums.

    The ebuild isn’t in the portage tree yet, so you’ll need to use an overlay. The overlay is normally in /usr/local/portage, but you should check that PORTDIR_OVERLAY is properly set in your /etc/make.conf configuration file.

    Here are the instructions:

    mkdir -p /usr/local/portage/media-video/handbrake/
    wget "" -O handbrake-0.9.5_p4039.ebuild
    ebuild /usr/local/portage/media-video/handbrake/handbrake-0.9.5_p4039.ebuild digest
    echo "media-video/handbrake ~x86" >> /etc/portage/package.keywords
    emerge -av handbrake

    The executables will be installed in /usr/bin/. You may wish to create a symlink for the GUI version of Handbrake: ghb

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(to be displayed above your comment)

(for moderation; your e-mail address will not be made public)