Compiling Handbrake CLI on Debian Lenny

August 03, 2010 Category: Uncategorized

In this post I will show you how to compile Handbrake for Debian Lenny. Please note that although the Handbrake GUI version does compile on Lenny, it crashes with a segmentation fault like this:

Gtk: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 17

(ghb:1053): GStreamer-CRITICAL **: gst_element_set_state: assertion `GST_IS_ELEMENT (element)' failed

(ghb:1053): GStreamer-CRITICAL **: gst_element_set_state: assertion `GST_IS_ELEMENT (element)' failed

(ghb:1053): GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT (object)' failed

Segmentation fault

So this post only describes how to compile the command-line version of Handbrake: HandBrakeCLI.

  • Issue the following apt-get commando to install all required libraries and software:

apt-get install subversion yasm build-essential autoconf libtool zlib1g-dev libbz2-dev intltool libglib2.0-dev libpthread-stubs0-dev

  1. Download the source code at http://sourceforge.net/projects/handbrake/files/

  2. Extract the source code and cd into the new handbrake directory.

  3. Compile handbrake like this:

./configure --disable-gtk --launch --force --launch-jobs=2

The --launch-jobs parameter determines how many parallel threads are used for compiling Handbrake, based on the number of CPU cores of your system. If you have a quad-core CPU you should set this value to 4.

The resulting binary is called HandBrakeCLI and can be found in the ./build directory. Issue a 'make install' to install this binary onto your system.

Comments