Changes between Version 11 and Version 12 of CompilationGuide/MacOSX


Ignore:
Timestamp:
Sep 15, 2012, 1:44:21 AM (6 years ago)
Author:
cbsrobot
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CompilationGuide/MacOSX

    v11 v12  
    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. 
    22 
    3 Some of the following dependencies can also be installed with [http://mxcl.github.com/homebrew/ homebrew] or [http://www.macports.org/ macports].  
     3[[BR]][[BR]] 
    44 
    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.  
     5== XCode  == 
    66 
    7 '''Solution:''' Install xCode via App Store ( This will download to the Applcations Folder). When ready, launch "xCode" and go thru the process of License aggrement.  
     7Starting 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]  
    88 
    9 '''Note:''' After installing xCode, you have to install an additional component in xCode via xCode > Preferrences > Downloads and install "Command Line Tools". Then start a new terminal session and procced to FFmpeg configure and install. 
     9The general procedure is {{{./configure <flags>; make && sudo make install}}}, but some use a different configuration scheme, or none at all.  
     10 
     11'''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. You may need to use cc/clang instead of gcc when compiling on Lion, i.e. {{{ --cc=cc --cxx=c++ }}} 
     12 
     13[[BR]][[BR]] 
    1014 
    1115== Dependencies  == 
    1216 
    13 === XCode  === 
    14  
    15 Starting 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 &gt; Downloads &gt; Components. Older versions are still available with an AppleID and free Developer account at [http://developer.apple.com developer.apple.com]  
     17Some of the following dependencies can also be installed with [http://mxcl.github.com/homebrew/ homebrew] or [http://www.macports.org/ macports].  
    1618 
    1719=== Freetype  === 
     
    1921Mac OS X Lion comes with Freetype already installed (older versions may need 'X11' selected during installation), but in an atypical location: /usr/X11. Running freetype-config in Terminal can give the locations of the individual folders, like headers, and libraries, so be prepared to add lines like {{{CFLAGS=`freetype-config --cflags` LDFLAGS=`freetype-config --libs`}}} before {{{./configure}}} when configuring packages that require freetype like gd and png.  
    2022 
    21 === Pkg-config &amp; GLib  === 
     23 
     24=== Pkg-config & GLib  === 
    2225 
    2326Pkg-config is necessary for detecting some of the libraries you can compile into FFmpeg, and it requires GLib which is not included in Mac OS X (but almost every other *nix distribution). You may either download pkg-config 0.23, or 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].  
     
    2730To compile pkg-config, run {{{GLIB_CFLAGS="-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include" GLIB_LIBS="-lglib-2.0 -lgio-2.0" ./configure --with-pc-path="/usr/X11/lib/pkgconfig:/usr/X11/share/pkgconfig:/usr/lib/pkgconfig:/usr/local/lib/pkgconfig"}}}  
    2831 
     32 
    2933=== Yasm  === 
    3034 
    31 Yasm is available from [http://yasm.tortall.net/Download.html Tortall.net] and is necessary for compiling C code that contains machine-independent Assembler code. To compile, run {{{./configure --enable-python;make && sudo make install}}}  
     35Yasm is available from [http://yasm.tortall.net/Download.html tortall.net] and is necessary for compiling C code that contains machine-independent Assembler code. To compile, run {{{./configure --enable-python; make && sudo make install}}}  
     36 
     37[[BR]][[BR]] 
    3238 
    3339== Additional libraries  == 
    3440 
     41These are just some axamples. Run {{{.configure --help}}} for all available options. Some of these libraries can also be installed with [http://mxcl.github.com/homebrew/ homebrew] or [http://www.macports.org/ macports].  
     42 
    3543=== FAAC (AAC)  === 
    3644 
    37 FAAC is available at [http://www.audiocoding.com/downloads.html AudioCoding.com]. Enabling support in ffmpeg requires the `--enable-libfaac --enable-nonfree` configure options.  
     45FAAC is available at [http://www.audiocoding.com audiocoding.com]. Enabling support in ffmpeg requires the `--enable-libfaac --enable-nonfree` configure options.  
    3846 
    3947=== Lame (MP3)  === 
    4048 
    41 Lame is available from [http://sourceforge.net/projects/lame/files/lame/ Sourceforge.net], and adds MP3 encoding to FFmpeg. Enabling support in ffmpeg requires `--enable-libmp3lame`.  
     49Lame is available at [http://sourceforge.net/projects/lame/files/lame/], and adds MP3 encoding to FFmpeg. Enabling support in ffmpeg requires `--enable-libmp3lame`.  
    4250 
    4351=== Libass  === 
    4452 
    45 In order to compile with `--enable-libass` you need Freetype installed.  
     53Libass is available at [http://code.google.com/p/libass/]. In order to compile with `--enable-libass` you need Freetype installed.  
    4654 
    4755=== OpenJPEG  === 
    4856 
    49 OpenJPEG is available at [http://code.google.com/p/openjpeg/downloads/list Code.Google.com]  
     57OpenJPEG is available at [http://code.google.com/p/openjpeg/downloads/list] . Compile with --enable-libopenjpeg . 
    5058 
    5159=== Schroedinger  === 
    5260 
    53 Schroedinger, 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.  
     61Schroedinger, 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 installed.  
    5462 
    5563=== Speex  === 
    5664 
    57 Speex is available at [http://downloads.xiph.org/releases/speex/ Xiph.org]  
     65Speex is available at [http://downloads.xiph.org/releases/speex/ xiph.org]. Compile with --enable-libspeex . 
    5866 
    5967=== Theora, Ogg, Vorbis, &amp; SDL  === 
    6068 
    61 All of these libraries are available at [http://theora.org/downloads/ Theora.org]  
     69All of these libraries are available at [http://theora.org/ theora.org]. Compile with --enable-libtheora . 
    6270 
    6371=== VPX  === 
    6472 
    65 VPX is available at [http://code.google.com/p/webm/downloads/list Code.Google.com], make sure you compile with --enable-vp8.  
     73VPX is available at [http://code.google.com/p/webm/downloads/list]. Compile with --enable-libvpx . 
    6674 
    6775=== x264  === 
    6876 
    69 FFmpeg 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.  
    70  
    71 <br>  
     77x264 is available at [http://www.videolan.org/developers/x264.html]. FFmpeg 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 .  
    7278 
    7379=== Xvid  === 
    7480 
    75 XVid is available from [http://www.xvid.org/Downloads.43.0.html XVid.org], under Developer Downloads  
     81XVid is available from [http://www.xvid.org xvid.org]. Compile with --enable-libxvid .  
     82 
     83[[BR]][[BR]] 
    7684 
    7785== Compiling  == 
     
    8694}}}  
    8795 
    88 <br>  
     96 
    8997 
    9098=== Install qt-faststart (optional)  ===