Changes between Version 11 and Version 12 of MacOSXCompilationGuide
- Timestamp:
- 09/15/2012 12:44:21 AM (8 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MacOSXCompilationGuide
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.1 Compiling on Mac OS X is as easy as any other *nix machine, there are just a few caveats. 2 2 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]] 4 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. 5 == XCode == 6 6 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.7 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 > Downloads > Components. Older versions are still available with an AppleID and free Developer account at [http://developer.apple.com developer.apple.com] 8 8 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. 9 The 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]] 10 14 11 15 == Dependencies == 12 16 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 > Downloads > Components. Older versions are still available with an AppleID and free Developer account at [http://developer.apple.com developer.apple.com] 17 Some of the following dependencies can also be installed with [http://mxcl.github.com/homebrew/ homebrew] or [http://www.macports.org/ macports]. 16 18 17 19 === Freetype === … … 19 21 Mac 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. 20 22 21 === Pkg-config & GLib === 23 24 === Pkg-config & GLib === 22 25 23 26 Pkg-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]. … … 27 30 To 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"}}} 28 31 32 29 33 === Yasm === 30 34 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}}} 35 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}}} 36 37 [[BR]][[BR]] 32 38 33 39 == Additional libraries == 34 40 41 These 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 35 43 === FAAC (AAC) === 36 44 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.45 FAAC is available at [http://www.audiocoding.com audiocoding.com]. Enabling support in ffmpeg requires the `--enable-libfaac --enable-nonfree` configure options. 38 46 39 47 === Lame (MP3) === 40 48 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`.49 Lame is available at [http://sourceforge.net/projects/lame/files/lame/], and adds MP3 encoding to FFmpeg. Enabling support in ffmpeg requires `--enable-libmp3lame`. 42 50 43 51 === Libass === 44 52 45 In order to compile with `--enable-libass` you need Freetype installed.53 Libass is available at [http://code.google.com/p/libass/]. In order to compile with `--enable-libass` you need Freetype installed. 46 54 47 55 === OpenJPEG === 48 56 49 OpenJPEG is available at [http://code.google.com/p/openjpeg/downloads/list Code.Google.com]57 OpenJPEG is available at [http://code.google.com/p/openjpeg/downloads/list] . Compile with --enable-libopenjpeg . 50 58 51 59 === Schroedinger === 52 60 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.61 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 installed. 54 62 55 63 === Speex === 56 64 57 Speex is available at [http://downloads.xiph.org/releases/speex/ Xiph.org]65 Speex is available at [http://downloads.xiph.org/releases/speex/ xiph.org]. Compile with --enable-libspeex . 58 66 59 67 === Theora, Ogg, Vorbis, & SDL === 60 68 61 All of these libraries are available at [http://theora.org/ downloads/ Theora.org]69 All of these libraries are available at [http://theora.org/ theora.org]. Compile with --enable-libtheora . 62 70 63 71 === VPX === 64 72 65 VPX is available at [http://code.google.com/p/webm/downloads/list Code.Google.com], make sure you compile with --enable-vp8.73 VPX is available at [http://code.google.com/p/webm/downloads/list]. Compile with --enable-libvpx . 66 74 67 75 === x264 === 68 76 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> 77 x264 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 . 72 78 73 79 === Xvid === 74 80 75 XVid is available from [http://www.xvid.org/Downloads.43.0.html XVid.org], under Developer Downloads 81 XVid is available from [http://www.xvid.org xvid.org]. Compile with --enable-libxvid . 82 83 [[BR]][[BR]] 76 84 77 85 == Compiling == … … 86 94 }}} 87 95 88 <br> 96 89 97 90 98 === Install qt-faststart (optional) ===


