Following is a "How To" for installing HandBrake, a clever little DVD-to-computer file ripper. Which of course, is quite handy for backing up your existing DVD collection (as opposed to those Netflix rented *ahem* DVDs).

I originally posted this on the Ubuntu forums as a mash-up of all the tutorials and posts I located on the net in my quest to get HandBrake up and running… credits given to authors below. 

  • This is primarily geared toward Linux users (Ubuntu or Debian in particular, although any Debian based distro like MEPIS, Xandros, Linspire, etc that uses aptitude/apt-get could make it work from these directions)
  • For Fedora Core amd other RPM based distros… this HOWTO may not work as intended. I recommend checking your distro’s forums and package manager for codecs and things like the Jam compiler. 
  • Mac owners (PPC or MacTel) might be more interested in the GUI version available at http://handbrake.m0k.org/?page_id=24
  • Windows users: If you are willng to "experiment", there is an .exe being built. Details are on the HandBrake forums (you may need to register with the forums to see this link).

 

HandBrake 0.7.1 CLI "HOWTO"


Well… there are a handful of howto’s spread around the net for building HandBrake in Ubuntu Linux… but as I have a rather nasty habit of tinkering and (attempting to) tweaking my Linux installs until something breaks horrendously (enough for me to need to re-install the OS)…

Much of it is derived from Mayank Sharma’s tutorial at http://www.linux.com/article.pl?sid=06/04/13/2139238 entitled "CLI Magic: Porting DVDs with HandBrake", but as I ran into a few rough bumps with it…

Here is what I did (again, this is pieced together from a few different HOWTOs) to get it running on my aging machine running Dapper:

-1. Download the source tarball:

Code:
wget -c http://download.m0k.org/handbrake/HandBrake-0.7.1.tar.gz

-2. Install these packages to make the HandBrake happy in its new (Ubuntu/Debian) home:
Code:
sudo aptitude updatesudo aptitude install jam build-essential nasm libdvdcss2

-3. Unzipped/un-tarred it in your home directory:
Code:
tar xvf HandBrake-0.7.1.tar.gz

-4. Rename the HandBrake-0.7.1 directory to HandBrake (trivial, but who really wants to type out all that version info in the path! )
Code:
mv HandBrake-0.7.1 HandBrake

-5. Switch to the HandBrake directory
Code:
cd HandBrake

-6. Configure the source
Code:
./configure

-7. Edit the Jamfile to make Ubuntu/Debian happy: (use your favorite text editor)
Code:
sudo nano ~./HandBrake/libhb/Jamfile

-8. Find the following line: (it should be near the bottom of the file)
Code:
ObjectCcFlags $(LIBHB_SRC) : -I$(TOP)/contrib/include ;

–8a. Make it look like this:
Code:
ObjectCcFlags $(LIBHB_SRC) : -I$(TOP)/contrib/include -I$(TOP)/contrib/mpeg4ip/lib/mp4v2 ;

–8b. Save/Write-out of the file…

-9. Jam it all together (requires installation of Jam, see #2 above)

Code:
jam

-10. Finishing up:
Code:
cp HBTest /usr/local/bin/handbrake

This allows you to pass commands to handbrake anywhere in a terminal.

For the record, this rips movies/DVDs to a suitable *.avi or *.mpg slightly faster on my old Compaq Presario running Dapper than the full-on GUI version does in Mac OSX on my fresh-from-the-Apple Store MacBook.

Credits go to Peter James Bui, jbird123 from the Ubuntu forums, and Mayank Sharma as mentioned above.

And of course, the coders who put HandBrake together.

I may re-post some helpful instructions for using the CLI (Command Line Interface) if I get permission from the author… it will help explain the somewhat mysterious commands HandBrake uses.

In the meantime, there is always the "help" operator: 

Code:
handbrake -h
This will display the list of commands and operators with some fair amount of detail.