Modification from:
https://trac.handbrake.fr/wiki/CompileOnWindows
--Note-- The HandBrake team will NOT support any custom build of HandBrake, be warned.
I found the easiest thing to do was:
Fresh Ubuntu 14.04 install:
sudo apt-get install subversion yasm build-essential autoconf libtool \
zlib1g-dev libbz2-dev libogg-dev libtheora-dev libvorbis-dev \
libsamplerate-dev libxml2-dev libfribidi-dev libfreetype6-dev \
libfontconfig1-dev libass-dev intltool libglib2.0-dev libdbus-glib-1-dev \
libgtk2.0-dev libgudev-1.0-dev libwebkit-dev libnotify-dev \
libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libappindicator-dev \
gcc-multilib
Or:
sudo apt-get install subversion yasm build-essential autoconf libtool
sudo apt-get install zlib1g-dev libbz2-dev libogg-dev libtheora-dev libvorbis-dev
sudo apt-get install libsamplerate-dev libxml2-dev libfribidi-dev libfreetype6-dev
sudo apt-get install libfontconfig1-dev libass-dev intltool libglib2.0-dev libdbus-glib-1-dev
sudo apt-get install libgtk2.0-dev libgudev-1.0-dev libwebkit-dev libnotify-dev
sudo apt-get install libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libappindicator-dev
sudo apt-get install gcc-multilib
>then:
sudo apt-get install git yasm libtool intltool cmake
>then:
Extract mingw-w64-bin_x86_64-linux_20131228.tar.bz2 to home folder as mingw
*-------------------------------------*
After those steps:
Then edit the file: libstdc++.la
Located: /home/User/mingw/x86_64-w64-mingw32/lib
Last option from: /home/mingw-w64/mingw-w64/linux-x86_64-x86_64/build/build/root/x86_64-w64-mingw32/lib/../lib
Change To: /home/User/mingw/x86_64-w64-mingw32/lib
Run:
export PATH=~/mingw/bin:$PATH
(to test mingw) Run: x86_64-w64-mingw32-gcc -v
>then:
git clone
https://github.com/HandBrake/HandBrake.git
-Outside of terminal go to the HandBrake folder and edit the file:
HandBrake/contrib/x265/module.defs
Using
https://bitbucket.org/multicoreware/x265/downloads/ for recent link you should change the fetch and extract info to look like:
X265.FETCH.url =
https://bitbucket.org/multicoreware/x26 ... 2.3.tar.gz
X265.FETCH.basename = x265_2.3.tar.gz
X265.EXTRACT.tarbase = x265_2.3
manually add new x265 tar to /home/test/HandBrake/download and extract
>then:
cd HandBrake
>then:
./configure --cross=x86_64-w64-mingw32 --enable-x265 --enable-qsv --enable-hwd --launch-jobs=1 --launch --enable-fdk
Files:
/home/User/HandBrake/build/HandBrakeCLI.exe
/home/User/HandBrake/build/libhb/hb.dll
------------------------------------
For GUI:
Compiling the Windows GUI
Install Microsoft Visual Studio Community edition from
https://www.visualstudio.com/en-us/prod ... ty-vs.aspx
Download zip:
https://github.com/HandBrake/HandBrake.git The source code for the GUI is in the Win/CS folder. The solution file is named HandBrake.sln
Please make sure HandBrakeWPF is set as the startup project in the "Solution Explorer". Right click it and choose "Set as startup project" if it is not.
change under HandBrake WPF > Converters > AUdio > AudioEncoderConverter.cs
Remove the if statment for: if (!HandBrakeEncoderHelpers.AudioEncoders.Any(a => a.ShortName.Contains("fdk")))
Save all
Now simply go to the Build Menu and click "Build Solution"
Please note, you will need to copy hb.dll into the output folder where HandBrake.exe is compiled to. Depending on the build profile you select, you will find it in a folder under: trunk\win\CS\HandBrakeWPF\bin\...
You'll also need the x265 .DLLs for the version you installed which you can get from
http://msystem.waw.pl/x265/
Get the GCC 6.3 version