Changes between Version 23 and Version 24 of CompilationGuide/MacOSX


Ignore:
Timestamp:
Dec 25, 2013, 9:06:36 PM (5 years ago)
Author:
llogan
Comment:

remove faac and libaacplus due to fdk-aac; remove libraries of questionalbe usefulness; remove qt-faststart, no need for it with "-movflags +faststart"

Legend:

Unmodified
Added
Removed
Modified
  • CompilationGuide/MacOSX

    v23 v24  
     1[[PageOutline(2, Contents)]]
     2
    13Compiling on Mac OS X is as easy as any other *nix machine, there are just a few caveats. The general procedure is {{{./configure <flags>; make && sudo make install}}}, but some use a different configuration scheme, or none at all.  You can also install the latest stable version of FFmpeg without the need to compile it yourself, which saves you a bit of time. Just follow this guide.
    2 
    3 [[BR]][[BR]]
    44
    55== Prerequisites and Dependencies ==
     
    1111=== Homebrew ===
    1212
    13 To get FFmpeg for OS X, you first have to install [http://brew.sh/ Homebrew].
     13To get FFmpeg for OS X, you first have to install [http://brew.sh/ Homebrew]:
    1414
    1515{{{
     
    1919=== Shortcut: Compile FFmpeg through Homebrew ===
    2020
    21 If you want to use Homebrew for compiling, you can simply run
     21If you want to use Homebrew for compiling, you can simply run:
    2222
    2323    {{{brew install ffmpeg}}}
     
    2929=== Remaining Dependencies ===
    3030
    31 First, we need to install a few dependencies.
     31First, we need to install a few dependencies:
    3232
    3333{{{
    34 brew install automake celt faac fdk-aac git lame libass libtool libvorbis libvpx \
    35 libvo-aacenc opencore-amr openjpeg opus sdl schroedinger shtool speex texi2html \
    36 theora wget x264 xvid yasm
     34brew install automake fdk-aac git lame libass libtool libvorbis libvpx \
     35opus sdl shtool texi2html theora wget x264 xvid yasm
    3736}}}
    3837
    39 Install {{{libaacplus}}} (at the moment, there is no Homebrew formula for it):
     38Mac 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.
    4039
    41 {{{
    42 wget http://217.20.164.161/~tipok/aacplus/libaacplus-2.0.2.tar.gz
    43 tar xzf libaacplus-2.0.2.tar.gz
    44 cd libaacplus-2.0.2
    45 # libtool on osx is quite different from the gnu libtool, which is called glibtool on osx
    46 sed -i '.bck' -e 's/libtool/glibtool/' autogen.sh
    47 ./autogen.sh
    48 make && make install
    49 cd ..
    50 }}}
    51 
    52 The new version of autoconf requires that you replace {{{AM_CONFIG_HEADER}}} in {{{configure.ac}}} at line 8 with {{{AC_CONFIG_HEADERS}}}. If you don't make this change you will see the following error message in the terminal:
    53 
    54 {{{
    55 configure.ac:8: error: 'AM_CONFIG_HEADER': this macro is obsolete.
    56     You should use the 'AC_CONFIG_HEADERS' macro instead.
    57 }}}
    58 
    59 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.
    60 
    61 
    62 [[BR]][[BR]]
     40----
    6341
    6442== Compile FFmpeg ==
    6543
    66 Once 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:
     44Once 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:
    6745
    6846{{{
    6947git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
    7048cd ffmpeg
    71 ./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libaacplus \
    72 --enable-libass --enable-libcelt --enable-libfaac --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame \
    73 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-openssl \
    74 --enable-libopus --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvo-aacenc \
    75 --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --prefix=/usr/local
     49./configure --enable-gpl --enable-version3 --enable-nonfree --enable-libass \
     50--enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus \
     51--enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 \
     52--enable-libxvid --prefix=/usr/local
    7653make && make install
    7754}}}
    7855
    79 Finally install {{{qt-faststart}}}. This is a useful tool if you're showing your H.264 MP4 videos on the web. It relocates the [http://www.adobe.com/devnet/video/articles/mp4_movie_atom.html MOOV atom] in the video to allow playback to begin before the file is completely downloaded. When converting files with ffmpeg you can use `-movflags faststart` to have the same effect.
    8056
    81 {{{
    82 make tools/qt-faststart
    83 }}}
     57----
    8458
    85 You can use it like this:
    86 
    87 {{{
    88 qt-faststart input.mp4 output.mp4
    89 }}}
    90 
    91 [[BR]][[BR]]
    9259
    9360== Manual install of the dependencies without Homebrew  ==