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

  1. Install SVN
  1. Install MinGW (5.1.6)
  2. Install MSYS (1.0)
    1. Install msysDTK-1.0.1
  3. Install MinGW/MSYS updates
    1. 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.
    2. 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

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