« Previous - Version 10/12 (diff) - Next » - Current version
vic, 2010-05-07 22:23


Compiling FFmpeg

Obtain FFmpeg

  1. Either get the latest version from the subversion repository :
    svn export svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
    

    Or download the latest tarball :
    wget http://ffmpeg.org/releases/ffmpeg-export-snapshot.tar.bz2
    tar jxvf ffmpeg-export-snapshot.tar.bz2
    

    Or get a specific revision. Swcale is configured as 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://svn.ffmpeg.org/ffmpeg/trunk -r {"2010-12-31"} --ignore-externals ffmpeg
    svn export svn://svn.ffmpeg.org/mplayer/trunk/libswscale -r {"2010-12-31"} ffmpeg/libswscale
    
  2. Patch using source:trunk/src/main/c/ffmpeg/javalog.patch (Overcomes compiler-specific variable argument lists and allow logging to be handled through Java) :
    patch -p0 < javalog.patch
    
  3. cd ffmpeg
  4. Follow the compilation steps for each platform.

Windows

  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
    

Linux

  • 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.