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


Compiling FFmpeg

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

    Example use :
    . script_name "2010-12-31" 
    
  2. Patch using source:trunk/src/main/c/ffmpeg/javalog.patch :
    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.