How to compile HandBrake w/ the GTK+ interface on Ubuntu Intrepid

19 10 2008

Recently i upgraded from Ubuntu hardy to the beta of Ubuntu Intrepid. I of course love the program Handbrake, which allows you to convert DVD’s and DVD like sources to a movie file, with presets to things like psp, ipod, apple tv, xbox 360, and more.

Anyway, the current stable version is 0.9.2, but the latest version, 0.9.3 svn, has the hotly anticipated GTK+ interface, which finally gives linux users a graphical interface rather then having to use the command line, which for this program can get quite complicated.

There are several guides for compiling on Ubuntu Hardy, but I noticed that there are a few changes that need to be done for it to work on Intrepid. Here is a step by step rundown of what to do.

First, you need to remove ffmpeg if you have it installed already so we can install one that has more codecs available.

sudo apt-get remove ffmpeg

Now, we add the medibuntu repo to our sources.list so we can install their version of ffmpeg. We also install the keyring package so we can actually use the repo.

sudo wget http://www.medibuntu.org/sources.list.d/hardy.list -O /etc/apt/sources.list.d/medibuntu.list 

sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update

now we install ffmpeg, this time from the medibuntu repo.

sudo apt-get install ffmpeg

Next, we install the required packages. For Intrepid, we do not need to compile from source yasm, as it includes a much more recent version. Get some coffee as this will take a while. (the entire thing is one command)

sudo apt-get install automake build-essential jam libdvdcss-dev libtool subversion zlib1g-dev libbz2-dev dvdbackup xmlto texinfo gfortran libgtk2.0-dev nasm doxygen libsdl1.2-dev gfortran-multilib gcc-multilib g++-multilib libesd0-dev libgtk1.2-dev libfftw3-dev electric-fence libx264-dev libx264-59 x264 libtheora-dev intltool gettext libgtk2.0-dev libglib2.0-dev libhal-storage1 libhal-storage-dev libhal-dev yasm libgtkhtml3.14-dev

Now, we need to make a directory to put the Handbrake svn files in. I personally have a svn folder within my home folder to contain all the svn files of the various programs i compile, that way I can exclude it from backups, and its just easy to remember

cd ~/
mkdir svn
cd svn
svn co svn://svn.handbrake.fr/HandBrake/trunk HandBrake
cd HandBrake

Now, we need to compile the program. In the past, the handbrake devs wanted you to use jam, but after running configure now, it says quite clearly that we are supposed to use make now. So, we shall. After you run make, this will take like 30 minutes to compile as it has to compile a bunch of libraries…so go watch some TV as this is finishing.

./configure
make
cd gtk
./autogen.sh
make
sudo make install

Thats it! Now there will be a HandBrake entry in the menu under applications > sound/video > Handbrake. Enjoy your ripping!


Actions

Information

22 responses

31 10 2008
jamezracer

thank you so much. this is hands down the best ripping program I have ever used, and so far the only one to rip into an mp4 wrapper without any problems.

31 10 2008
polygon89

your quite welcome. I also love handbrake =)

5 11 2008
Jonathan

Love the GUI. I’ve been using the CLI version because you can’t normally download the GUI version.

I’ve been using this to backup my old dvd movies with great quality.

Thanks!

5 11 2008
Russianspi

Quite helpful. Thanks!

5 11 2008
polygon89

i’m glad i could help!

10 11 2008
stijn

Hmm got a problem: Keeps givin’ me a “**Error**: You must have `glib’ installed.” error. But libglib is installed (2.O).. Any clues?

10 11 2008
polygon89

post the entire error here, i actually noticed when using my own guide that a few things are wrong, there seems to be an extra package that needs to be installed for it to work, and i will edit it soon

11 11 2008
stijn

ive screwed it up i think. I started to install *dev packages… I’ve got it so far that it starts compiling but it exit’s with an error (/usr/bin/lb -lbz2 not found, or something like that…)

I’m re-installing my ubuntu somewhere today…I’ll post you the exact error when it’s back.
btw thanx for the help!

11 11 2008
stijn

found it! I found some package list on another blog:

sudo apt-get install automake build-essential jam libdvdcss-dev libtool subversion zlib1g-dev libbz2-dev dvdbackup xmlto texinfo gfortran libgtk2.0-dev nasm doxygen libsdl1.2-dev gfortran-multilib gcc-multilib g++-multilib libesd0-dev libgtk1.2-dev libfftw3-dev electric-fence libx264-dev libx264-59 x264 libtheora-dev intltool gettext libgtk2.0-dev libglib2.0-dev libhal-storage1 libhal-storage-dev libhal-dev

it’s from http://andrewalliance.wordpress.com/2008/08/29/handbrake-with-gui-ubuntu-linux-how-to/
cheers!

13 11 2008
Kurtis

THANK YOU SO MUCH!!!!
I’m almost in tears right now I’m so happy that I finally got this working. I don’t have any idea how you figured this stuff out but now I finally got it working. Thank you so much!

13 11 2008
Carl

I used a similar method to run on 8.04 Hardy and when I updated to 8.10 Intrepid, I get about half the performance. I used to be able to do H264/AAC (Apple TV default) at 60fps. Now I am getting 20fps with the same settings and hardware.

Either the latest version cuts performance some how (bug in the current SVN build) or Intrepid is a resource hog.

15 11 2008
polygon89

I do not think its intrepid as i’m running it fine with similiar fps’s that i got on hardy. Something else must be wrong…maybe try recompiling? Or maybe it has something to do that you didnt reinstall from scratch

18 11 2008
Freddy

these are the dependencies for ubuntu 8.10 cli + gtk:

* subversion
* jam
* yasm
* build-essential
* autogen
* autoconf
* intltool
* libtool
* zlib1g-dev
* libbz2-dev
* libglib2.0-dev
* libgtk2.0-dev
* libhal-dev
* libhal-storage-dev
* libgtkhtml3.14-dev

sudo apt-get install subversion jam yasm build-essential autogen autoconf intltool libtool zlib1g-dev libbz2-dev libglib2.0-dev libgtk2.0-dev libhal-dev libhal-storage-dev libgtkhtml3.14-dev

18 11 2008
Freddy

you must add the medibuntu’s intrepid repo:

* sudo wget http://www.medibuntu.org/sources.list.d/intrepid.list -O /etc/apt/sources.list.d/medibuntu.list
* sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update

21 11 2008
Rainer

Two comments:

– replace the package “libdvdcss2-dev” with “libdvdcss-dev”

-to compile the GUI, you have to install the following dev-package:

sudo apt-get install libgtkhtml3.14-dev

Then it works like a charm…

Thank you!!

4 03 2009
ctopkelly

it seems that i am getting and error when i run the command ./configure

“ERROR: scratch (build) directory must not be the same as source root”

Not sure what this means

4 03 2009
ctopkelly

I get this error when i run the ./configure command?

ERROR: scratch (build) directory must not be the same as source root

not sure where to go from here

5 03 2009
polygon89

i really have no idea…i would maybe delete the svn folder and try again, and make sure you installed everything correctly.

22 04 2009
michael

I keep getting the following error:

No package ‘gstreamer-interfaces-0.10’ found
No package ‘gstreamer-video-0.10’ found
No package ‘gstreamer-pbutils-0.10’ found

any ideas?

2 06 2009
anonymous_seeder

libgstreamer-plugins-base0.10-dev

30 01 2011
Joel Bradshaw

Thanks for this! I was trying to compile other things with the same dependencies, and this fixed me right up!

22 04 2009
polygon89

Hi michael,

yeah there are some missing dependencies, its hard because the handbrake svn is changing a lot and the dependencies are constantly shifting

I really am quite busy at the moment, so i dunno when i am going to have a chance to basically rewrite this tutorial (as it kinda needs one), so if you just need the interface, you can actually just download a precompiled deb with the user interface from handbrakes website:

http://handbrake.fr/rotation.php?file=HandBrake-0.9.3-Ubuntu_GUI_i386.deb

But if you need to compile it from svn, you need some sort of gstreamer-dev package, i am not at home or on ubuntu at the moment so i’m not sure which one it was, but i know it was missing some developer package.

I will edit this in the future however =P

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: