Compiling FFmpeg

Obtain FFmpeg

  1. Either download and extract the daily snapshot
    Or get the latest version from the subversion repository :
    svn export svn:// ffmpeg

    Or get a specific revision. Swcale is configured as a link to another repository with different version numbers so in this case you need to specify the revision by date, not by id :
    svn export svn:// -r {"2010-12-31"} --ignore-externals ffmpeg
    svn export svn:// -r {"2010-12-31"} ffmpeg/libswscale
  2. Patch using source:trunk/src/main/c/ffmpeg/javalog.patch. This patch overcomes issues with compiler-specific variable argument lists and allows logging to be handled through Java. This is optional but without it ffmpeg logs will go to stderr :
    patch -p0 < javalog.patch
  3. cd ffmpeg
  4. Follow the compilation steps for each platform.


  1. Install MinGW & MSys. Follow this guide
  2. Compile
    ./configure --prefix=/home/User/lib --disable-ffmpeg --disable-ffplay --disable-ffserver --enable-shared --disable-static --enable-gpl --enable-version3 --enable-memalign-hack
    make -j 3


  • Compile
    ./configure --prefix=/home/User/lib --disable-ffmpeg --disable-ffplay --disable-ffserver --enable-shared --disable-static --enable-gpl --enable-version3
    make -j 3

Mac OS X

  1. Install XCode
  2. Compile
    ./configure --disable-ffmpeg --disable-ffplay --disable-ffserver --enable-shared --disable-static --enable-gpl --enable-version3 --shlibdir="@loader_path" 
    make -j 3
Note : dylibs under Mac OS X contain hardcoded absolute paths to their dependencies. There are 3 special keywords to allow relocatable binaries :
  • @executable_path : path of the main executable
  • @loader_path : path of the binary which loads the library (can be an intermediary library).
  • @rpath : a runtime-dependent path. See Apple documentation on the subject for mode details.

In this case the --shlibdir configuration option is used to set the install_name of the libraries. The actual install step is skipped.