Changes between Version 12 and Version 13 of MacOSXCompilationGuide
- Timestamp:
- 09/18/2012 11:27:03 PM (9 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MacOSXCompilationGuide
v12 v13 9 9 The general procedure is {{{./configure <flags>; make && sudo make install}}}, but some use a different configuration scheme, or none at all. 10 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++ }}} 11 [[BR]][[BR]] 12 13 == Compiling on OSX using Homebrew for the dependencies == 14 15 First install [http://mxcl.github.com/homebrew/ homebrew] and some dependencies: 16 {{{ 17 ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go); 18 brew install automake faac git lame libass libtool libvorbis libvpx libvo-aacenc \ 19 opencore-amr openjpeg opus sdl schroedinger shtool speex texi2html theora \ 20 wget x264 xvid yasm; 21 }}} 22 23 Install fdk-aac (atm. there is no recipe for it): 24 {{{ 25 git clone git://opencore-amr.git.sourceforge.net/gitroot/opencore-amr/fdk-aac; 26 cd fdk-aac; 27 autoreconf -fvi; 28 ./configure --disable-shared; 29 make && make install; 30 }}} 31 32 Install libaacplus (atm. there is no recipe for it): 33 {{{ 34 wget http://217.20.164.161/~tipok/aacplus/libaacplus-2.0.2.tar.gz; 35 tar xzf libaacplus-2.0.2.tar.gz; 36 cd libaacplus-2.0.2; 37 # now open autogen.sh with a text editor and change all occurrences of libtool to glibtool and all libtoolize to glibtoolize 38 ./autogen.sh; 39 make && make install; 40 }}} 41 42 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` PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig:/usr/X11/lib/pkgconfig }}} before {{{./configure}}} or add them to your $HOME/.profile file. 43 44 Install ffmpeg 45 {{{ 46 git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg; 47 cd ffmpeg; 48 ./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libaacplus \ 49 --enable-libass --enable-libfaac --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame \ 50 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-openssl \ 51 --enable-libopus --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvo-aacenc \ 52 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --prefix=/usr/local; 53 make && make install; 54 }}} 55 56 Finally install qt-faststart. This 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. Code: 57 {{{ 58 make tools/qt-faststart 59 }}} 12 60 13 61 [[BR]][[BR]] 14 62 15 == Dependencies == 16 17 Some of the following dependencies can also be installed with [http://mxcl.github.com/homebrew/ homebrew] or [http://www.macports.org/ macports]. 63 == Manual install of the dependencies == 18 64 19 65 === Freetype === … … 39 85 == Additional libraries == 40 86 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].87 These are just some examples. Run {{{.configure --help}}} for all available options. 42 88 43 === FAAC (AAC) === 89 FAAC (AAC) is available at [http://www.audiocoding.com audiocoding.com]. Enabling support in ffmpeg requires the `--enable-libfaac --enable-nonfree` configure options. 44 90 45 FAAC is available at [http://www.audiocoding.com audiocoding.com]. Enabling support in ffmpeg requires the `--enable-libfaac --enable-nonfree` configure options.91 Lame (MP3) is available at [http://sourceforge.net/projects/lame/files/lame/], and adds MP3 encoding to FFmpeg. Enabling support in ffmpeg requires `--enable-libmp3lame`. 46 92 47 === Lame (MP3) === 93 Libass (Subtitle) is available at [http://code.google.com/p/libass/]. In order to compile with `--enable-libass` you need Freetype installed. 48 94 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`. 50 51 === Libass === 52 53 Libass is available at [http://code.google.com/p/libass/]. In order to compile with `--enable-libass` you need Freetype installed. 54 55 === OpenJPEG === 56 57 OpenJPEG is available at [http://code.google.com/p/openjpeg/downloads/list] . Compile with --enable-libopenjpeg . 58 59 === Schroedinger === 95 OpenJPEG (Jpeg 2000) is available at [http://code.google.com/p/openjpeg/downloads/list] . Compile with --enable-libopenjpeg . 60 96 61 97 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. 62 98 63 === Speex ===64 65 99 Speex is available at [http://downloads.xiph.org/releases/speex/ xiph.org]. Compile with --enable-libspeex . 66 100 67 === Theora, Ogg, Vorbis, & SDL === 68 69 All of these libraries are available at [http://theora.org/ theora.org]. Compile with --enable-libtheora . 70 71 === VPX === 101 Theora, Ogg and Vorbis are available at [http://theora.org/ theora.org]. Compile with --enable-libtheora . 72 102 73 103 VPX is available at [http://code.google.com/p/webm/downloads/list]. Compile with --enable-libvpx . 74 104 75 === x264 ===76 77 105 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 . 78 79 === Xvid ===80 106 81 107 XVid is available from [http://www.xvid.org xvid.org]. Compile with --enable-libxvid .


