courtesy qyot27 from
and courtesy liquid217 from
0. Create yourself a VM with XP in it. Within that, do the following.
1. Download and install XP PowerToys "Open Command Window Here" from
2. Download an install 7zip from http://www.7-zip.org/
3. Download and install latest the Mingw automated installer from
You will need to check the "MSYS Basic System", and the "MinGW Developer Toolkit".
4.1 Download and extract the latest of following packages into C:\MinGW\msys\1.0\bin
The utilities must be placed directly in this path, not a subdirectory of it.
wget 1.11.4 http://users.ugent.be/~bpuype/cgi-bin/fetch.pl?dl=wget/wget.exe
7zip CLI http://www.7-zip.org/download.html -- note we want the CLI version
4.2 Download the latest Win32 exe UNRAR from http://www.rarlab.com/rar/unrarw32.exe
Put it into the msys's bin directory (c:\mingw\msys\1.0\bin).
4.3 Download the latest Win32 exe yasm from
Rename it to yasm.exe, and put it in the msys's bin directory (c:\mingw\msys\1.0\bin).
4.4 Download the Win32 exe nasm from http://www.nasm.us
The current version is http://www.nasm.us/pub/nasm/releasebuilds/2.09.04/win32/nasm-2.09.04-win32.zip
Extract both nasm.exe and ndisasm.exe into the msys's bin directory (c:\mingw\msys\1.0\bin).
5. In Windows Explorer, show folders and navigate to c:\mingw\msys\1.0 (old instrictions said "C:\msys\1.0"),
Right-click on the "1.0" in the folders pane, and choose the "Open Command Window Here" option.
Type 'msys --norxvt' (without the quotes), and hit enter.
On first load, it will create a directory for you with your name in the 'home' directory.
For instance, c:\mingw\msys\1.0\home\qyot27 or c:\mingw\msys\1.0\home\myusername
From here on out, I'll be using Unix-style directory naming when talking about the compiling process
- c:\mingw\msys\1.0 is referred to as /, and the folders beneath it would be /bin, /home, /local, or so on).
* other cmd tool ** Now, right-click on the Prompt's title bar and choose Properties.
* other cmd tool ** Under the 'Edit Options' area, make sure that QuickEdit mode is checked, and then click OK.
* other cmd tool ** When the Apply Properties dialog comes up, choose 'Save properties for future windows with same title'.
5.1 In Windows Explorer, show folders and navigate to c:\mingw\msys\1.0
Right-click on the file msys.bat and drag it somewhere onto whitespace in that folder andrelease the right-click.
Select "Create Shortrcut Here" from the pop-up context menu.
Right-click on the new shortcut and rename it to get rid of the ".bat".
Right-click on the new shortcut and choose "Properties".
* add --norxvt to the Target, so that it looks like this C:\MinGW\msys\1.0\msys.bat --norxvt
* ensure the "Start In" is set to C:\MinGW\msys\1.0
Now you can copy this shortcut to wherever you want - desktop, quickstart bar etc - and use it to start msys.
6. There are a couple things you should compile and install first, though. The latest zlib and bzip2.
(from time to time, check these version are the latest by checking the websites http://zlib.net and http://bzip.org)
Assuming your username is "yourusername" then do the following...
With the MSys prompt open, copy and paste the following commands and hit Enter after each line:
tar -xzvf zlib-1.2.5.tar.gz
make -f win32/Makefile.gcc BINARY_PATH=/mingw/bin INCLUDE_PATH=/mingw/include LIBRARY_PATH=/mingw/lib install
tar -xzvf bzip2-1.0.6.tar.gz
cp *.h /mingw/include
cp *.a /mingw/lib
7. Download Git, which you'll need to download ffmpeg's source code. Download the installer from here:
Specifically as at 26 Jan 2011 :-
Launch the installer, and click Next until you get to selecting the components you want to install.
Uncheck everything but Windows Explorer integration, and under that section, choose the 'Context menu entries' option.
You can uncheck 'Git GUI Here' if you want, as you won't be using it.
Just make sure that 'Git Bash Here' is checked.
Now keep on clicking Next until the install finishes.
7.1 Now, you should be in Windows Explorer looking inside C:\msys\1.0\home\yourusername for the next bit.
In the left pane of Windows Explorer, right click on the new 'yourusername' folder and choose Git Bash Here.
8. With the Git Bash window still open, type or copy-&-paste the following command and then hit Enter:
git clone git://git.ffmpeg.org/ffmpeg.git
9. That will create a folder named ffmpeg and download FFmpeg's source code into it. Wait.
When the download is finished, close the Git Bash window by typing in the command: exit
10. Open the MSys window like previously described
(right-click, Open Command Prompt Here, 'msys --norxvt'), or even better - use the Shortcut you created earlier
12. Now that MSys' prompt is open, type or copy-&-paste the following commands - hit Enter after each one:
./configure --enable-gpl --enable-version3 --enable-postproc --enable-memalign-hack --enable-runtime-cpudetect --enable-avisynth --extra-cflags="-U__STRICT_ANSI__"
Things to try
./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-memalign-hack --enable-runtime-cpudetect --enable-avisynth --extra-cflags="-U__STRICT_ANSI__"
(Special note for the above:
IF you're going to be using the build on just ONE computer,
Leave out --enable-runtime-cpudetect and add '-march=native' to the --extra-cflags option, like this: --extra-cflags="-march=native -U__STRICT_ANSI__"
In other words to make it portable, DO NOT do this)
13. Generally speaking, the same steps apply to just about any type of software you can compile with GCC:
A './configure' step
A 'make' step
A 'make install' step
Yes, sometimes the actual steps differ, but the assumption is typically that the above three commands are the default.
Before attempting this, though, make sure that there's actually a file in the source code's directory named 'configure'
- if there isn't, that means it uses a different process, and there's usually files named INSTALL or README
which you can refer to in order to see if they describe the build process for that piece of software.
Also, whenever dealing with the ./configure step,
it's usually possible to do './configure --help', which will list all the options you can give to ./configure.
14. The files/options specified by http://ffmpeg.arrozcru.org/autobuilds/ffmpeg/readme/ffmpeg-r26400-swscale-r32676-README
Automated FFmpeg 32-bit Windows builds made by Ramiro Polla.
FFmpeg revision: 26400
SwScale revision: 32676
Build date: Tue, 18 Jan 2011 04:05:32 -0200
libswscale version: 0.12.0
libavcodec version: 52.108.0
libavcore version: 0.16.1
libavdevice version: 52.2.3
libavformat version: 52.93.0
libavutil version: 50.36.0
libavfilter version: 1.74.0
--enable-librtmp --extra-libs='-lrtmp -lpolarssl -lws2_32 -lwinmm'
All source code used can be found at:
Comments, suggestions, bug reports, compliments, donations, etc:
These builds are cross-compiled from an amd64 Ubuntu Jaunty system.
The relevant development package versions from the main repository are:
The cross-compilation packages are available from:
The cross-development package versions from that repository are:
The external libraries compiled into FFmpeg are:
The license for each library can be found in the licenses directory.