Introduction
This is a guide on how to build FFMpeg. Currently the target platforms are Windows XP (32 bit) and OSX 10.5+ (32 bit). For the most part the build instructions are similar for most platforms and so platform specific issues are mentioned inline.
In most cases dependencies are mentioned and linked to a specific version due to compatibility issues, for exmaple regarding certain builds of FFMpeg and LAME not working together. That said, many of the specific versions are likely those that happened to work at a given point in time.
Setting up the build environment
Windows
- Install SVN
- http://subversion.tigris.org/files/documents/15/45940/svn-win32-1.6.2.zip unzip to msys/local http://wiki.openttd.org/Compiling_on_MinGW#Install_SVN
- Install MinGW (5.1.6)
- Install the bare MinGW. In particular do NOT install make.
- Install wget for MinGW (for the sake of the script).
- http://downloads.sourceforge.net/project/mingw/mingwPORT/Current%20Releases/wget-1.9.1-mingwPORT.tar.bz2?use_mirror=cdnetworks-us-1
- This turns out (apparently) to be nontrivial because of socket issues under MinGW. If your'e lucky this binary http://sourceforge.net/projects/mingw/files will work for you.
- Yasm
- http://www.tortall.net/projects/yasm/
- Rename yasm executable to yasm.exe and place in mingw/bin/mingwPORT/Current%20Releases/wget-1.9.1-mingwPORT.tar.bz2/download
- Install MSYS (1.0)
- Install msysDTK-1.0.1
- Install MinGW/MSYS updates
- CoreUtil? (MSYS)
- Extract these to your MSYS directory
- coreutils-5.97-MSYS-1.0.11-snapshot.tar.bz2
- MSYS may be missing the program 'pr'. It is supposed to be found in coreutils however even some releases of coreutil are missing it.
- GCC 4.5 (MINGW)
- Extract these to your MinGW directory. The latest version of FFMpeg as of this writing requires GCC >= 4.2.
- gcc-c++-4.5.0-1-mingw32-bin.tar.lzma
- gcc-core-4.5.0-1-mingw32-bin.tar.lzma
- gmp-5.0.1-1-mingw32-dev.tar.lzma
- libgcc-4.5.0-1-mingw32-dll-1.tar.lzma
- libgmp-5.0.1-1-mingw32-dll-10.tar.lzma
- libgomp-4.5.0-1-mingw32-dll-1.tar.lzma
- libmpc-0.8.1-1-mingw32-dll-2.tar.lzma
- libmpfr-2.4.1-1-mingw32-dll-1.tar.lzma
- libpthread-2.8.0-3-mingw32-dll-2.tar.lzma
- libssp-4.5.0-1-mingw32-dll-0.tar.lzma
- libstdc++-4.5.0-1-mingw32-dll-6.tar.lzma
- mpc-0.8.1-1-mingw32-dev.tar.lzma
- mpfr-2.4.1-1-mingw32-dev.tar.lzma
- pthreads-w32-2.8.0-3-mingw32-dev.tar.lzma
- CoreUtil? (MSYS)
OSX
Install XCode, which gives you the GCC toolchain.
Build Dependencies
- Instructions here are for a static build.
- On windows add --prefix=/mingw to ./configure for all dependencies
libx264
- ./configure && make && make install
lame
- ./configure --disable-shared --enable-static --disable-frontend && make && make install
libfaac
- ./configure --enable-static --disable-shared --without-mp4v && make && make install
Build FFMpeg
- revision 23008
- ./configure --enable-static --disable-shared --enable-memalign-hack --enable-libmp3lame --enable-libx264 --enable-gpl --disable-doc --disable-ffplay --disable-ffserver --enable-postproc --enable-swscale --enable-nonfree --enable-libfaac && make
