Tuesday, October 6, 2009

HandBrake Nightlies for Windows

Update (4/26/10): I will no longer provide these packages because the HandBrake devs are now providing real-deal official nightlies: http://build.handbrake.fr/

**These are UNSUPPORTED, BLEEDING EDGE builds of HandBrake. DO NOT ask for help in the HandBrake forums if you run into any issues with them. If you have a problem, ask it here and I will try to help. Otherwise, YOU ARE ON YOUR OWN.**

Additionally, these are not true nightlies because I won't be building them quite that often, but I plan to compile a new version each time a substantial update (such as an x264 bump) is checked into the SVN repository.

The CLI binaries are cross-compiled on my Linux box and the GUI is built natively in Windows.

Friday, October 2, 2009

Cross-compiling HandBrake for Windows on an Ubuntu Linux Host

I wanted to use an up-to-date build of HandBrake on my Windows machines, but I am not comfortable building from source in Windows. Thankfully, the HandBrake devs recently switched over to a cross-compile-compatible build chain using MinGW, so it's possible to build Windows executables from my Ubuntu box.

To start, we'll download the standard HandBrake dependencies, which you would already have installed if you've built it on a Linux system before:
sudo aptitude install subversion build-essential m4 wget autotools-dev yasm autoconf intltool libtool libbz2-dev zlib1g-dev
Next, we'll download the MinGW packages, which will install a Windows-compatible build chain on top of your Linux system:
sudo aptitude install mingw32
Then, we'll pull down the latest code from the SVN repository:
svn co svn://svn.handbrake.fr/HandBrake/trunk HandBrake
Switch to the newly downloaded code:
cd HandBrake
Then get the build started:
./configure --launch-jobs=0 --cross=i586-mingw32msvc --launch
Things will chug along fine until the build script reaches the LAME library, at which point it will fail during the configure script with an error:
"configure: error: CHECK_TYPE_uint32_t - please report to lame-dev @ lists.sourceforge.net"
To correct this, we'll need to open the configure script in a text editor:
gedit build/contrib/lame/lame/configure
and then do a 'find and replace' to change all instances of this:
FILE *f = fopen ("conftest.val", "w")
to this:
FILE *f = fopen ("conftest.val", "wb")
After that, just go into your build directory and restart the build script (it will automatically remember that we're compiling for Windows):
cd build ; make
You'll have to do the same thing for libogg when it fails. Apparently, this problem is somehow related to autoconf... Once the script finishes, you should be left with a shiny new binary named HandBrakeCLI.exe!

Analytics Tracking Footer