How to Compile x264 on 32 & 64 Bit Windows
For those wishing to use the Intel Compiler please see kemuri-_9's guide
here. Big thanks to kemuri-_9 and all who worked to make this possible.
Download, and Install:Komisar's GCC Builds for MinGWThe current stable version is:
http://komisar.gin.by/mingw/index.htmlTo Install it, download the version which applies to your system, and extract it to a folder (with
7-Zip, or your favorite archiver).
MSYShttps://sourceforge.net/projects/mingw/files/The current stable version is:
MSYS > BaseSystem > msys-core > msys-1.0.11 > MSYS-1.0.11.exe
To install, launch the execution file, and after the setup has completed, a post-install script will run. Press "y" enter, "y" enter, then point it to your MinGW installation which you just created.
YasmDownload yasm, the latest stable version is:
Yasm-1.0.1-win32.exe -- Copy this file to the MinGW\bin folder, and rename it to yasm.exe.
GPAC (for direct MP4 muxing), FFMS2, LAVF, & PthreadsThanks to Komisar, we have packages which contain both 32 & 64-bit versions of both GPAC and Pthreads available to us. Download
Libpack for build x264 Extract this to your MinGW folder and add (overwrite) the "i686-pc-mingw32" and "x86_64-pc-mingw32" folders.
GitDownload Git from here, the latest stable version is:
http://code.google.com/p/msysgit/downloads/list"Git-1.7.0.2-preview20100309.exe"
When installing Git, on the "Adjusting your PATH environment" page, use the third option: "Run Git and included Unix tool from the Windows Command Prompt"; this will let you use everything installed from MSYS.
"Gitting" x264 & Compiling it.Create a folder where you want to keep your x264 revisions, then open Git and enter this:
git clone git://git.videolan.org/x264.git "C:/path/to/x264folder"Grab a raw video file from here (or any ol' video or AviSynth Script would work, if you don't want one of these):
http://trace.kom.aau.dk/yuv/qcif.htmlftp://ftp.ldv.e-technik.tu-muenchen.de/dist/test_sequences/1080p/This allows the compiler to analyze the code while it is doing actual work, and thereby improves its efficiency.
Extract the video file to somewhere convenient, but do not rename the file!
To apply a patch, paste the .diff in the x264 trunk (the downloaded git repository), then in MSYS, use
patch -p1 < "Patch name goes here.diff"Now to "make" x264, open MSYS, type
cd "/path/to/downloaded/git"Then
./configureAnd lastly
make fprofiled VIDS="/path/to/downloadedYUV/file"See here for more on the commandline usage. After a few minutes, x264.exe will be compiled and placed in your x264 Git folder.
Compiling the 64 Bit Version.You must use these configure commands to compile the 64 Bit version:
./configure --cross-prefix=x86_64-w64-mingw32- --host=x86_64-pc-mingw32The rest is the same as for 32 Bit. Do note; however, that you cannot use fprofiled on a 32 Bit system -- Windows obviously cannot execute a 64 bit application in a 32 bit environment.

To re-make x264, do a
make clean then use the above instructions.