Building HandBrake for AMD64

Support for HandBrake on Linux, Solaris, and other Unix-like platforms
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
BrakeHand
Posts: 4
Joined: Fri Dec 07, 2007 3:32 pm

Building HandBrake for AMD64

Post by BrakeHand »

First of all I have to say that HandBrake is an excellent piece of software. I have used it on Windows XP, but my problem is that my desktop pc is way too old and slow. Since I have a faster AMD64 Linux server I've tried to build HandBrake for AMD64, but I can't get it to work.

Info about my system:
AMD Athlon(tm) 64 X2 Dual Core Processor 3600+
2 GB RAM
Debian 4.0 (etch)
Linux <hostname> 2.6.18-5-amd64 #1 SMP <date> x86_64 GNU/Linux

Installed (relevant) packages includes:
ii autoconf 2.61-4
ii automake 1.10+nogfdl-1
ii devscripts 2.9.26
ii g++ 4.1.1-15
ii g++-4.1 4.1.1-21
ii gcc 4.1.1-15
ii gcc-4.1 4.1.1-21
ii gcc-4.1-base 4.1.1-21
ii jam 2.5rel-1
ii libgcc1 4.1.1-21
ii libtool 1.5.22-4
ii make 3.81-2
ii makedev 2.3.1-83
ii yasm 0.5.0-2
ii zlib1g-dev 1.2.3-13

Version of HandBrake I'm trying to build:
HandBrake-0.9.1.tar.gz (MD5: 0eefe9189d59a0bfd9aeee41fd3d01a2)

Build command:
make

Relevant output:

Code: Select all

[...]
LibXvidCore ./lib/libxvidcore.a 
configure: loading cache 
[...]
...updated 34 target(s)...
[...]
decavcodec.c: In function âdecavcodecWorkâ:
decavcodec.c:108: warning: âavcodec_decode_audioâ is deprecated (declared at ../contrib/include/ffmpeg/avcodec.h:2552)
[...]
Shared library libhb.so
/usr/bin/ld: common.o: relocation R_X86_64_32S against `hb_audio_mixdowns' can not be used when making a shared object; recompile with -fPIC
common.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
Compile line for libhb.so was:

make[1]: *** [libhb.so] Error 1
make: *** [libhb/libhb.a] Error 2
I've searched both the forum and Google for a solution, but I havn't found anything. Can anyone help?
Last edited by BrakeHand on Sat Dec 08, 2007 11:37 pm, edited 1 time in total.
BrakeHand
Posts: 4
Joined: Fri Dec 07, 2007 3:32 pm

Post by BrakeHand »

Update: Same problem with svn version checked out today (revision 1108)
User avatar
s55
HandBrake Team
Posts: 10357
Joined: Sun Dec 24, 2006 1:05 pm

Post by s55 »

You need to run ./configure && jam

You'll also need jam 2.5 installed
BrakeHand
Posts: 4
Joined: Fri Dec 07, 2007 3:32 pm

Post by BrakeHand »

You need to run ./configure && jam
Thought I could use "make" since that was stated in the BUILD file, but tried again with "./configure && jam" and looks like that was the 'trick'. The command exited without errors and at least "HandBrakCLI -h" works now (haven't tried to actually convert a video yet). Thanx :D
BrakeHand
Posts: 4
Joined: Fri Dec 07, 2007 3:32 pm

Post by BrakeHand »

Looks like everything works as it should. If it's of interest to anyone, this is what I did (not sure I needed all the packages though...):

Code: Select all

$ sudo apt-get install make gcc g++ jam autoconf automake libtool libz-dev yasm devscripts subversion
$ svn co svn://handbrake.m0k.org/HandBrake/trunk HandBrake
$ cd HandBrake/
$ ./configure && jam 
I'm converting DVD to mp4 for iPod Touch with these settings:

Code: Select all

$ ./HandBrakeCLI -i <path to VIDEO_TS dir> -o <output file> -f mp4 -e x264b30 -s 1 -m -b 720 -Y 320 -E faac -R 48 kHz -B 128 -x cabac=0:ref=1:analyse=all:me=umh:subme=6:no-fast-pskip=1:trellis=1 -2
I'm not sure if the "-R 48 kHz" and "-B 128" combination makes sense, but I hope this will give me a fairly good result. Time (approx. one more hour) will show :)
stmiller
Novice
Posts: 59
Joined: Thu Apr 12, 2007 8:16 pm

Re: Building HandBrake for AMD64

Post by stmiller »

BrakeHand wrote:

Code: Select all

Compile line for libhb.so was:

make[1]: *** [libhb.so] Error 1
make: *** [libhb/libhb.a] Error 2
I've searched both the forum and Google for a solution, but I havn't found anything. Can anyone help?
I had to temporary move /usr/bin/faac and /usr/bin/faad out of the way. The Debian/Ubuntu provided packages for those conflict when building HandBrake.

I have the Brisbane 3600 chip and get about 10FPS faster encoding in 64bit Linux with a 64bit HandBrake.
fwaokda
Posts: 3
Joined: Sun Dec 23, 2007 10:39 pm

Post by fwaokda »

Thanks for following up with what you did. It was great to see considering im new to ubuntu and was looking for a how-to on this exact problem. :wink:
fwaokda
Posts: 3
Joined: Sun Dec 23, 2007 10:39 pm

Post by fwaokda »

Code: Select all

$ sudo apt-get install make gcc g++ jam autoconf automake libtool libz-dev yasm devscripts subversion
$ svn co svn://handbrake.m0k.org/HandBrake/trunk HandBrake
$ cd HandBrake/
$ ./configure && jam 
is there a gui for handbrake if i followed the steps above?
User avatar
s55
HandBrake Team
Posts: 10357
Joined: Sun Dec 24, 2006 1:05 pm

Post by s55 »

no
fwaokda
Posts: 3
Joined: Sun Dec 23, 2007 10:39 pm

Post by fwaokda »

is it possible to obtain a gui for it? or is it all terminal based?
User avatar
s55
HandBrake Team
Posts: 10357
Joined: Sun Dec 24, 2006 1:05 pm

Post by s55 »

There is no working GUI in the SVN. Just code that's a work in progress that doesn't do alot right now.

The only thing that resembles any form of gui is Handbrake GTK (mentioned a few posts below) but its based of very buggy/old pre-release code (for the windows GUI) so It's not recommended for usage. It is also not supported by the HandBrake team. I'm not sure but it doesn't appear to have had any kind of work done on it for a while now so I wouldn't be surprised if its been abandoned.

Much better of just learning the CLI.
http://handbrake.m0k.org/trac/wiki/CLIGuide
Post Reply