Changes between Version 12 and Version 13 of CompilationGuide/MacOSX


Ignore:
Timestamp:
Sep 19, 2012, 12:27:03 AM (5 years ago)
Author:
cbsrobot
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CompilationGuide/MacOSX

    v12 v13  
    99The general procedure is {{{./configure <flags>; make && sudo make install}}}, but some use a different configuration scheme, or none at all.  
    1010 
    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 
     15First install [http://mxcl.github.com/homebrew/ homebrew] and some dependencies: 
     16{{{  
     17ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go); 
     18brew install automake faac git lame libass libtool libvorbis libvpx libvo-aacenc \ 
     19opencore-amr openjpeg opus sdl schroedinger shtool speex texi2html theora \ 
     20wget x264 xvid yasm; 
     21}}} 
     22 
     23Install fdk-aac (atm. there is no recipe for it): 
     24{{{ 
     25git clone git://opencore-amr.git.sourceforge.net/gitroot/opencore-amr/fdk-aac; 
     26cd fdk-aac; 
     27autoreconf -fvi; 
     28./configure --disable-shared; 
     29make && make install; 
     30}}} 
     31 
     32Install libaacplus (atm. there is no recipe for it): 
     33{{{ 
     34wget http://217.20.164.161/~tipok/aacplus/libaacplus-2.0.2.tar.gz; 
     35tar xzf libaacplus-2.0.2.tar.gz; 
     36cd 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; 
     39make && make install; 
     40}}} 
     41 
     42Mac 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 
     44Install ffmpeg 
     45{{{ 
     46git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg; 
     47cd 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; 
     53make && make install; 
     54}}} 
     55 
     56Finally 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{{{ 
     58make tools/qt-faststart 
     59}}} 
    1260 
    1361[[BR]][[BR]] 
    1462 
    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  == 
    1864 
    1965=== Freetype  === 
     
    3985== Additional libraries  == 
    4086 
    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].  
     87These are just some examples. Run {{{.configure --help}}} for all available options. 
    4288 
    43 === FAAC (AAC)  === 
     89FAAC (AAC) is available at [http://www.audiocoding.com audiocoding.com]. Enabling support in ffmpeg requires the `--enable-libfaac --enable-nonfree` configure options.  
    4490 
    45 FAAC is available at [http://www.audiocoding.com audiocoding.com]. Enabling support in ffmpeg requires the `--enable-libfaac --enable-nonfree` configure options.  
     91Lame (MP3) is available at [http://sourceforge.net/projects/lame/files/lame/], and adds MP3 encoding to FFmpeg. Enabling support in ffmpeg requires `--enable-libmp3lame`.  
    4692 
    47 === Lame (MP3)  === 
     93Libass (Subtitle) is available at [http://code.google.com/p/libass/]. In order to compile with `--enable-libass` you need Freetype installed.  
    4894 
    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  === 
     95OpenJPEG (Jpeg 2000) is available at [http://code.google.com/p/openjpeg/downloads/list] . Compile with --enable-libopenjpeg . 
    6096 
    6197Schroedinger, 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.  
    6298 
    63 === Speex  === 
    64  
    6599Speex is available at [http://downloads.xiph.org/releases/speex/ xiph.org]. Compile with --enable-libspeex . 
    66100 
    67 === Theora, Ogg, Vorbis, &amp; SDL  === 
    68  
    69 All of these libraries are available at [http://theora.org/ theora.org]. Compile with --enable-libtheora . 
    70  
    71 === VPX  === 
     101Theora, Ogg and Vorbis  are available at [http://theora.org/ theora.org]. Compile with --enable-libtheora . 
    72102 
    73103VPX is available at [http://code.google.com/p/webm/downloads/list]. Compile with --enable-libvpx . 
    74104 
    75 === x264  === 
    76  
    77105x264 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  === 
    80106 
    81107XVid is available from [http://www.xvid.org xvid.org]. Compile with --enable-libxvid .