« Previous - Version 5/12 (diff) - Next » - Current version
vic, 2010-05-07 09:09

Compiling FFmpeg

First create a small script to export a consistent version of ffmpeg and libswscale :

rm -rf ffmpeg/
svn export svn://svn.ffmpeg.org/ffmpeg/trunk -r {"$1"} --ignore-externals ffmpeg
svn export svn://svn.ffmpeg.org/mplayer/trunk/libswscale -r {"$1"} ffmpeg/libswscale
cd ffmpeg

Example use :
. script_name "2010-01-01" 

Then follow the compilation steps for each platform.


  1. Install MinGW & MSys
  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


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 : one or more runtime-dependent paths. 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.