Handbrake for Haiku

Is there any possibility of getting Handbrake, which was originally a BeOS application working on Haiku? When I visited the Handbrake forum, I came across this post by kallisti5, where he had apparently made an attempt at a Haiku build. What, if anything became of this?

HandBrake for Haiku

Quote

Postby kallisti5 » Sat Jan 22, 2011 6:28 pm

Here are the steps I have to far towards compiling HandBrake under Haiku…

I got to libass… but ran out of gas for now. I am not really sure how the contrib patch system in Handbrake works… but a lot of these fixes might be automated.

This is all gcc4, gcc2 isn’t worth trying.

installoptionalpackage -a python

/Data/HandBrake-0.9.5> cp make/variant/linux.defs make/variant/haiku.defs
/Data/HandBrake-0.9.5> ./configure --prefix=/boot/common
/Data/HandBrake-0.9.5> cd ./build
/Data/HandBrake-0.9.5/build> make

  • build for faac fails
    /Data/HandBrake-0.9.5/build> cd contrib/faac/faac-1.28
    /Data/HandBrake-0.9.5/build/contrib/faac/faac-1.28> libtoolize --force --copy --install
    /Data/HandBrake-0.9.5/build/contrib/faac/faac-1.28> aclocal
    /Data/HandBrake-0.9.5/build/contrib/faac/faac-1.28> autoconf
  • remove all references to -lm and -lstdc++ in frontend/Makefile.in
    /Data/HandBrake-0.9.5/build/contrib/faac/faac-1.28> cd …/…/…/
    /Data/HandBrake-0.9.5/build> make
  • build for faad2 fails
    /Data/HandBrake-0.9.5/build> cd contrib/faad2/faad2-2.7
    /Data/HandBrake-0.9.5/build/contrib/faad2/faad2-2.7> libtoolize --force --copy --install
    /Data/HandBrake-0.9.5/build/contrib/faad2/faad2-2.7> aclocal
    /Data/HandBrake-0.9.5/build/contrib/faad2/faad2-2.7> autoconf
  • edit libfaad/common.h and remove lrintf definition block (we need logic to not define lrintf if we are on Haiku)
    /Data/HandBrake-0.9.5/build/contrib/faad2/faad2-2.7> cd …/…/…/
    /Data/HandBrake-0.9.5/build> make
  • ffmpeg builds ok
  • freetype builds ok
  • libxml2 fails
    /Data/HandBrake-0.9.5/build> cd contrib/libxml2/libxml2-2.7.7
    /Data/HandBrake-0.9.5/build/contrib/libxml2/libxml2-2.7.7> libtoolize --force --copy --install
    /Data/HandBrake-0.9.5/build/contrib/libxml2/libxml2-2.7.7> aclocal
    /Data/HandBrake-0.9.5/build/contrib/libxml2/libxml2-2.7.7> autoconf
    /Data/HandBrake-0.9.5/build/contrib/libxml2/libxml2-2.7.7> cd …/…/…/
    /Data/HandBrake-0.9.5/build> make
  • fontconfig fails
    /Data/HandBrake-0.9.5/build> cd contrib/fontconfig/fontconfig-2.8.0/
    /Data/HandBrake-0.9.5/build/contrib/fontconfig/fontconfig-2.8.0> libtoolize --force --copy --install
    /Data/HandBrake-0.9.5/build/contrib/fontconfig/fontconfig-2.8.0> echo ‘AC_CONFIG_MACRO_DIR([m4])’ >> configure.in
    /Data/HandBrake-0.9.5/build/contrib/fontconfig/fontconfig-2.8.0> aclocal
    /Data/HandBrake-0.9.5/build/contrib/fontconfig/fontconfig-2.8.0> autoconf
  • edit configure
  • remvove:
    "
    PKG_PROG_PKG_CONFIG

if test “$enable_libxml2” = “yes” -o “$expat” = “no”; then
PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= 2.6)
"

/Data/HandBrake-0.9.5/build/contrib/fontconfig/fontconfig-2.8.0> CC="/boot/develop/tools/gnupro/bin/gcc" CFLAGS="" CXX=/boot/develop/tools/gnupro/bin/g++ CXXFLAGS="" CPPFLAGS="" LDFLAGS="" ./configure --prefix=/Data/HandBrake-0.9.5/build/contrib/ --disable-dependency-tracking --disable-shared --enable-static --enable-libxml2 --with-freetype-config=/Data/HandBrake-0.9.5/build/contrib/bin/freetype-config LIBXML2_LIBS="-L/Data/HandBrake-0.9.5/build/contrib/lib -lxml2" LIBXML2_CFLAGS="-I/Data/HandBrake-0.9.5/build/contrib/include/libxml2"

  • command above will fail.
  • remove the fi at line provided

/Data/HandBrake-0.9.5/build/contrib/fontconfig/fontconfig-2.8.0> CC="/boot/develop/tools/gnupro/bin/gcc" CFLAGS="" CXX=/boot/develop/tools/gnupro/bin/g++ CXXFLAGS="" CPPFLAGS="" LDFLAGS="" ./configure --prefix=/Data/HandBrake-0.9.5/build/contrib/ --disable-dependency-tracking --disable-shared --enable-static --enable-libxml2 --with-freetype-config=/Data/HandBrake-0.9.5/build/contrib/bin/freetype-config LIBXML2_LIBS="-L/Data/HandBrake-0.9.5/build/contrib/lib -lxml2" LIBXML2_CFLAGS="-I/Data/HandBrake-0.9.5/build/contrib/include/libxml2"

/Data/HandBrake-0.9.5/build/contrib/fontconfig/fontconfig-2.8.0> touch …/.stamp.configure
/Data/HandBrake-0.9.5/build/contrib/fontconfig/fontconfig-2.8.0> cd …/…/…/
/Data/HandBrake-0.9.5/build> make

  • lame will fail
    /Data/HandBrake-0.9.5/build> cd contrib/lame/lame
    /Data/HandBrake-0.9.5/build/contrib/lame/lame> libtoolize --force --copy --install
    /Data/HandBrake-0.9.5/build/contrib/lame/lame> echo ‘AC_CONFIG_MACRO_DIR([m4])’ >> configure.in
    /Data/HandBrake-0.9.5/build/contrib/lame/lame> libtoolize --force --copy --install
    /Data/HandBrake-0.9.5/build/contrib/lame/lame> aclocal
  • edit configure.in
  • change AM_PATH_GTK(1.2.0, HAVE_GTK=“yes”, HAVE_GTK=“no”)
    to
    HAVE_GTK=“no”
  • change "PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2, HAVE_SNDFILE=“yes”, HAVE_SNDFILE=“no”)"
    to
    HAVE_SNDFILE=“no”
    /Data/HandBrake-0.9.5/build/contrib/lame/lame> autoconf
    /Data/HandBrake-0.9.5/build/contrib/lame/lame> cd frontend
  • remove all references to @SNDFILE_LIBS@ @GTK_LIBS@ @GTK_CFLAGS@ @SNDFILE_CFLAGS@ in Makefile
    /Data/HandBrake-0.9.5/build/contrib/lame/lame> cd …/…/…/…/
    /Data/HandBrake-0.9.5/build> make
  • libass will fail
    /Data/HandBrake-0.9.5/build> cd contrib/libass/libass-0.9.9
    /Data/HandBrake-0.9.5/build/contrib/libass/libass-0.9.9> libtoolize --force --copy --install
    /Data/HandBrake-0.9.5/build/contrib/libass/libass-0.9.9> aclocal
  • edit configure.ac
    remove all lines containing “AC_DEFINE”

/Data/HandBrake-0.9.5/build/contrib/libass/libass-0.9.9> autoconf

  • endless PKG_CHECK_MODULES errors.

The failure you have seen is due to a lack of superior female intellect influence in Haiku project.

Once men embrace female superiority and properly submit themselves to their natural female superior, both Haiku and they will enjoy a release. They will become disciplined, organized and capable.

If you want Haiku to succeed, seek out and submit to your superior and dominant female.

All women are superior to men and all women are a potential Dominatrix. Women on the train or in the park, anywhere. Seek them with desparation. Every woman has a hidden female power that if released, will cause her man be the skilled programmer Haiku needs.

HandBrake is available in haikuports and I’ve just updated it to 0.10.1.
The steps above are not needed anymore as there are packages and recipes ready for them.
I had to build a few deps first tho, namely:

  • faac _x86, libass_x86, libmpeg2_x86, libmp4v2_x86 and libmkv_x86.

Of course it would be nice to have them all available in HaikuDepot.

This is good news. Since I installed a CD/DVD drive into my Haiku box to test BurnitNow2 I might as well try Handbrake.

Thanks!

Diver,
You just made my day. I’m guessing some significant additions or changes will be needed to get it to the point where it is available in HaikuDepot for testing. Did you build it from source, or have you been in contact with the current development team about a Haiku version?
My understanding is that Eric Petit is no longer involved, and the current versions are all forks. Can you keep us updated in this thread?

The resulting package contains HandBreake_CLI tool, so it has no GUI yet. Therefore, it’s not very useful I think. I built it from source.

See https://bitbucket.org/haikuports/haikuports/src/master/media-video/handbrake

that is a very old post, but IIRC Handbrake does have a QT4 GUI available, which means haiku can get a working QT handbrake GUI, today.

Would creating a GUI for HandBrake be the responsibility of the HandBrake development team or is it something the Haiku project could do independently? Would it be worth contacting the HandBrake team to see if they would be willing to create a Haiku build, considering that the original HandBrake was a BeOS app?

The Handbrake team wouldn’t create the Qt version on Haiku, but if they would update the Qt version, we could could get that running with a lot less effort. So it really is worth reaching out to them. Or if someone else has an up to date Qt version we could work with that.

There used to be qtHB GUI for HandBrake but I can’t find any traces of it on the web.

[quote=Diver]The resulting package contains HandBreake_CLI tool, so it has no GUI yet. Therefore, it’s not very useful I think. I built it from source.

See https://bitbucket.org/haikuports/haikuports/src/master/media-video/handbrake[/quote]

That link leads to a “deleted” message.

But give me a CLI tool and I’ll write a GUI front-end in yab for it. Maybe not with ALL the switches at first, but enough to get us going.

You can compile it with a simple:

hp handbrake

Keep getting stuck on libmp4v2, which must be compiled to x86, apparently. But will keep tinkering.

Found a source for the original BeOS version

ljr.free.fr slash archives slash index.php question mark path equals beos%2Fhandbrake slash

Sorry, need this to get past the spam filter

Downloading now and will be trying to see if any of the versions there run.

hp libmp4v2_x86
hp handbrake_x86

Awesome! Reverse the slashes for the URL:

ljr.free.fr\archives\index.php?path=beos%2Fhandbrake

HandBrake v 0.7.1 was the last version for BeOS.
BeOS build runs on Haiku. Sources not support Haiku. You can try/fix it:

you can download an .hpkg file from http://clasquin-johnson.co.za/michel/repo

before Handbrake 1.0 the Haiku version was all GUI.

Don’t know if one can use the same GUI and update it to the new Handbrake API.

you can try to get it to build from here. probably not the latest Handbrake but here you have the latest Haiku/BEOS GUI.

I’ve merged the patches in https://github.com/haikuports/haikuports/commit/005299
But it still needs some more fixes to make it work with the new Handbrake API.
If someone wants to give it a go please do!