1. Common prerequsites
- Internet access to be able to clone the FFmpeg repository
- MSYS package (incl. Git), preferably from http://sourceforge.net/projects/mingwbuilds/files/external-binary-packages/
- Yasm assembler, http://www.tortall.net/projects/yasm/releases/yasm-1.3.0-win32.exe

1.1 Additional prerequisites for the gcc toolchain
- MinGW-w64 package, http://sourceforge.net/projects/mingw-w64/

1.2 Additional prerequisites for the msvc toolchain
- msinttypes package, http://code.google.com/p/msinttypes/downloads/list

2. Preparation
- Install the MSYS package to a directory not containing any spaces
- Rename msys/bin/link.exe to msys/bin/link.exe.sav in order to allow MSVC link.exe to be found
- Rename yasm-1.3.0-win32.exe to yasm.exe and copy it to the /msys/bin directory
- Use mingw-w64-install.exe to install MinGW (select 'win32' as threads and 'sjlj' as exception)
- Copy the inttypes.h file from the msinttypes package to $VS_PATH/VC/include
- If necessary, adapt the MSYS_DIR variable in BuildFFmpeg.bat
- If you want to use the icl toolchain, adapt the ICC_BIN_DIR variable in BuildFFmpeg.bat if necessary
- If you want to use the gcc toolchain, adapt the MINGW_BIN variable in BuildFFmpeg.sh if necessary
- You may also want to adapt the DST_DIR_NAME and BUILD_DIR_NAME variables in BuildFFmpeg.sh

3. Building FFmpeg
- Run BuildFFmpeg.bat which will set some environment variables and then automatically runs BuildFFmpeg.sh which
  will build the DLLs. For a list of supported command line options, see the comments in file BuildFFmpeg.bat.
- Examples
  * To build the x86 FFmpeg DLLs with the Microsoft compiler, run:
    BuildFFmpeg.bat x86 -t msvc
  * To build the x64 FFmpeg DLLs with the GCC compiler, run:
    BuildFFmpeg.bat x64 -t gcc

4. Notes
- If you want to use the msvc toolchain, you must ensure that the right link.exe version ($VS_PATH/VC/bin/link.exe)
  is used, otherwise the build will fail.
