Menu

How to build ffmpeg

alkra

Download MinGW-w64 x86 and x64 toolchains:

Download Win64 and Win32 toolchain
http://sourceforge.net/projects/mingw-w64/files/

Download MSYS:
http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/MSYS-20110309.zip/download

Download Yasm
http://www.tortall.net/projects/yasm/releases/vsyasm-1.1.0-win32.zip

MSYS (32bit)
Unpack MSYS to c:\msys.
Save yasm-1.1.0-win32.exe from vsyasm-1.1.0-win32.zip as yasm.exe in C:\msys\bin

Unpack 32- and 64-bit MinGW(personal build) to c:\mingw32 and c:\mingw64 respectively.
Copy /bin directory from automated builds to c:\mingw32\bin or c:\mingw64\bin

Create c:/msys/etc/fstab file with the following contents:

c:/mingw32 /mingw32
c:/mingw64 /mingw64

insert line: call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"
on top of C:\msys\msys.bat
Run C:\msys\msys.bat (this will create the home folder at C:\msys\home\%username%).

Unpack ffmpeg source to the msys home folder (C:\msys\home\%username%).

64bit binaries

Run the following script to build 64bit binaries:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#!/bin/sh

PATH="/mingw64/bin:$PATH"

make clean

./configure --sysroot=/mingw64/bin --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --prefix=../bin/x64 \
--enable-shared --disable-static --enable-memalign-hack --enable-runtime-cpudetect --disable-debug \
--extra-cflags='-Dstrtod=__strtod' \
--disable-doc  --disable-ffserver \
--disable-pthreads

make
make install

32bit binaries

Run the following script to build 32bit binaries:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#!/bin/sh

PATH="/mingw32/bin:$PATH"

make clean

./configure --cross-prefix=i686-w64-mingw32- --arch=i686 --target-os=mingw32 --prefix=../bin/x86 \
--enable-shared --disable-static --enable-memalign-hack --enable-runtime-cpudetect --disable-debug \
--extra-cflags='-Dstrtod=__strtod' \
--disable-doc  --disable-ffserver \
--disable-pthreads

make
make install

Related

Wiki: Home

MongoDB Logo MongoDB