Changes between Version 1 and Version 2 of CompilationGuide/MacOSX


Ignore:
Timestamp:
Mar 11, 2012, 1:11:18 AM (8 years ago)
Author:
cbsrobot
Comment:

added some dependencies

Legend:

Unmodified
Added
Removed
Modified
  • CompilationGuide/MacOSX

    v1 v2  
    1 Compiling on Mac OS X is as easy as any other *nix machine, there are just a few caveats. For all of the packages described here, the general procedure is "./configure --help;./configure <flags>;make && sudo make install", but some use a different configuration scheme, or none at all.
     1Compiling on Mac OS X is as easy as any other *nix machine, there are just a few caveats. For all of the packages described here, the general procedure is "./configure --help;./configure <flags>; make && sudo make install", but some use a different configuration scheme, or none at all.
     2
     3Some of the following dependencies can also be installed with [http://mxcl.github.com/homebrew/ homebrew] or [http://www.macports.org/ macports].
     4
     5'''Attention Lion 10.7 Users:''' Due to defects in the llvm-gcc compiler, static macros defined in FFmpeg will fail to be recognized, resulting in a fatal error. Use cc/clang instead of gcc when compiling on Lion.
     6
    27== Dependencies ==
     8
    39=== XCode ===
     10
    411Starting with Lion 10.7, Xcode is available for free from the Mac App Store and is required to compile anything on your Mac. Make sure you install the Command Line Tools from Preferences > Downloads > Components. Older versions are still available with an AppleID and free Developer account at [http://developer.apple.com developer.apple.com]
     12
     13
    514=== Pkg-config & GLibC ===
    6 Pkg-config is necessary for detecting some of the libraries you can compile into FFmpeg, and it requires GLibC which is not included in Mac OS X (but almost every other *nix distribution). You must download the large tarball from [http://ftp.gnome.org/pub/GNOME/sources/glib/ Gnome.org] and compile it.
    7 Pkg-config is available from [http://pkgconfig.freedesktop.org/releases/ Freedesktop.org]
     15
     16Pkg-config is necessary for detecting some of the libraries you can compile into FFmpeg, and it requires GLibC which is not included in Mac OS X (but almost every other *nix distribution). You must download the large tarball from [http://ftp.gnome.org/pub/GNOME/sources/glib/ Gnome.org] and compile it. Pkg-config is available from [http://pkgconfig.freedesktop.org/releases/ Freedesktop.org]. After installing pkg-config, you might need to modify your ~/.profile to reflect all pkgconfig locations in your PKG_CONFIG_PATH environment variable - f.ex:
     17
     18export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
     19
     20
    821=== Yasm ===
     22
     23
     24== Additional libraries ==
     25
     26=== CDIO ===
     27
     28=== Faac ===
     29
     30=== Freetype ===
     31
     32
    933=== Lame (MP3) ===
     34
    1035Lame is available from [http://sourceforge.net/projects/lame/files/lame/ Sourceforge.net], and adds MP3 abilities to FFmpeg. Compilation is as easy as {{{./configure;make && sudo make install}}}, but you can also add --enable-mp3x, and --enable-mp3rtp.
     36
     37
     38=== Libass ===
     39
     40In order to compile with --enable-libass you need Freetype installed.
     41
     42=== Opencore-amrnb / Opencore-amrwb ===
     43
     44=== OpenJPEG ===
     45
     46
    1147=== Schroedinger ===
     48
    1249Schroedinger, which adds Dirac codec support, is available from [http://diracvideo.org/ DiracVideo.org]. To compile schroedinger, you need ORC, available from [http://code.entropywave.com/download/orc/ EntropyWave.com]. Compile orc with the standard procedure, making sure you delete the "testsuite" folder, which won't compile. When compiling schroedinger, make sure pkg-config and yasm are already compiled.
    13 === OpenJPEG ===
    14 === CDIO ===
     50
     51
     52=== SDL ===
     53
    1554=== Speex ===
     55
    1656=== Theora ===
     57
    1758=== Vorbis ===
     59
    1860=== VPX ===
     61
     62
    1963=== x264 ===
    20 === XVid ===
     64
     65FFmpeg depends on x264 when compiled with --enable-libx264 and x264 depends on FFmpeg when compiled with --enable-lavf-input. The best way to handle it is to install x264 first without --enable-lavf-input then compile FFmpeg with --enable-libx264 and finally compile x264 again with --enable-lavf-input.
     66
     67
     68=== Xvid ===
     69
     70
    2171== Compiling ==
     72
    2273Once you have compiled all of the codecs/libraries you want, you can now download the FFmpeg source either with git or the from release tarball links on the website. Study the output of ./configure --help and make sure you've enabled all the features you want, remembering that --enable-nonfree and --enable-gpl will be necessary for some of the dependencies above. A sample command is:
    2374
    24 {{{./configure --enable-nonfree --enable-libcdio --enable-libschroedinger --enable-libfaac --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-openssl --enable-zlib --enable-gpl}}}
     75{{{
     76./configure --enable-nonfree --enable-libcdio --enable-libschroedinger --enable-libfaac --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-openssl --enable-zlib --enable-gpl
    2577
    26 '''Attention Lion 10.7 Users:''' Due to defects in the llvm-gcc compiler, static macros defined in FFmpeg will fail to be recognized, resulting in a fatal error. Use cc/clang instead of gcc when compiling on Lion.
     78make
     79make install
     80}}}
     81
     82
     83=== Install qt-faststart (optional) ===
     84This is a useful tool if you're showing your H.264 MP4 videos on the web. It relocates some data in the video to allow playback to begin before the file is completely downloaded. Usage: qt-faststart input.mp4 output.mp4.
     85Code:
     86
     87{{{
     88make tools/qt-faststart
     89}}}