Changes between Version 34 and Version 35 of CompilationGuide/Centos


Ignore:
Timestamp:
Nov 14, 2014, 2:13:44 AM (5 years ago)
Author:
llogan
Comment:

simplify some things, make is installed by default

Legend:

Unmodified
Added
Removed
Modified
  • CompilationGuide/Centos

    v34 v35  
    1 = Compile FFmpeg on CentOS 6.x =
     1= Compile FFmpeg on CentOS =
    22
    33[[PageOutline(2, Contents)]]
    44
    5 This guide is based on minimal CentOS and will provide a local, non-system installation of FFmpeg with several external encoding libraries. These instructions should also work for recent Red Hat Enterprise Linux (RHEL) and Fedora. This is a non-invasive guide and undoing all steps is simple and is shown at the end of this page.
     5This guide is based on a minimal installation of the latest CentOS release, and will provide a local, non-system installation of FFmpeg with support for several external encoding libraries. These instructions should also work for recent Red Hat Enterprise Linux (RHEL) and Fedora. This is a non-invasive guide and undoing all steps is simple and is shown at the end of this page.
    66
    77----
     
    1414}}}
    1515
    16 Get the dependencies:
     16Get the dependencies. These are required compiling, but you can remove them when you are done if you prefer (except `make`; it should be installed by default and many things depend on it).
    1717{{{
    1818# yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel
    1919}}}
    2020
    21 Make a directory to put all of the source code into:
     21In your home directory make a new directory to put all of the source code into:
    2222{{{
    2323mkdir ~/ffmpeg_sources
     
    3434
    3535=== Yasm ===
     36
    3637Yasm is an assembler used by x264 and FFmpeg.
    37 {{{
    38 cd ~/ffmpeg_sources
    39 curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
    40 tar xzvf yasm-1.2.0.tar.gz
    41 cd yasm-1.2.0
     38
     39{{{
     40cd ~/ffmpeg_sources
     41git clone --depth 1 git://github.com/yasm/yasm.git
     42cd yasm
     43autoreconf -fiv
    4244./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"
    4345make
    4446make install
    4547make distclean
    46 export "PATH=$PATH:$HOME/bin"
    4748}}}
    4849
    4950=== libx264 ===
     51
    5052H.264 video encoder.
    5153
    52 Requires `ffmpeg` to be configured with `--enable-gpl` `--enable-libx264` `--extra-libs=-ldl`.
     54Requires `ffmpeg` to be configured with `--enable-gpl` `--enable-libx264`.
    5355
    5456{{{
     
    6365
    6466=== libfdk_aac ===
     67
    6568AAC audio encoder.
    6669
     
    7982
    8083=== libmp3lame ===
     84
    8185MP3 audio encoder.
    8286
     
    9599
    96100=== libopus ===
     101
    97102Opus audio decoder and encoder.
    98103
     
    101106{{{
    102107cd ~/ffmpeg_sources
    103 curl -O http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz
    104 tar xzvf opus-1.1.tar.gz
    105 cd opus-1.1
     108git clone git://git.opus-codec.org/opus.git
     109cd opus
     110autoreconf -fiv
    106111./configure --prefix="$HOME/ffmpeg_build" --disable-shared
    107112make
     
    111116
    112117=== libogg ===
    113 Ogg bitstream library. Required by libtheora and libvorbis.
    114 {{{
    115 cd ~/ffmpeg_sources
    116 curl -O http://downloads.xiph.org/releases/ogg/libogg-1.3.1.tar.gz
    117 tar xzvf libogg-1.3.1.tar.gz
    118 cd libogg-1.3.1
     118
     119Ogg bitstream library. Required by [#libtheora libtheora] and [#libvorbis libvorbis].
     120
     121{{{
     122cd ~/ffmpeg_sources
     123curl -O http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.gz
     124tar xzvf libogg-1.3.2.tar.gz
     125cd libogg-1.3.2
    119126./configure --prefix="$HOME/ffmpeg_build" --disable-shared
    120127make
     
    124131
    125132=== libvorbis ===
     133
    126134Vorbis audio encoder. Requires [#libogg libogg].
    127135
     
    140148
    141149=== libvpx ===
     150
    142151VP8/VP9 video encoder.
    143152
     
    155164
    156165=== FFmpeg ===
     166
    157167{{{
    158168cd ~/ffmpeg_sources
    159169git clone --depth 1 git://source.ffmpeg.org/ffmpeg
    160170cd ffmpeg
    161 PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig"
    162 export PKG_CONFIG_PATH
    163 ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --bindir="$HOME/bin" --extra-libs=-ldl --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264
     171PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --bindir="$HOME/bin" --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264
    164172make
    165173make install
    166174make distclean
    167175hash -r
    168 . ~/.bash_profile
    169176}}}
    170177
     
    172179
    173180{{{
    174 #!div style="border: 1pt dotted; margin: 1em; background-color: #fffff9;"
    175 '''Note:''' Keep the `ffmpeg_sources` directory and all contents if you intend to update or uninstall as shown below.
     181#!div style="border: 1pt dotted; margin: 1em; background-color: #ddffdd;"
     182'''Tip:''' Keep the `ffmpeg_sources` directory and all contents if you intend to [#Updating update] as shown below. Otherwise you can delete this directory.
    176183}}}
    177184
     
    180187== Additional Libraries ==
    181188
    182 Other libraries codecs that you may require (but probably do not). These must be installed before you compile ffmpeg.
     189Other external libraries that you may require (but probably do not). These must be installed before you compile `ffmpeg`.
    183190
    184191=== libfreetype ===
     192
    185193Font rendering library. Required for the [http://ffmpeg.org/ffmpeg-filters.html#drawtext-1 drawtext] video filter.
    186194
     
    191199}}}
    192200
    193 === libspeex ===
    194 Speex audio decoder and encoder.
    195 
    196 Requires `ffmpeg` to be configured with `--enable-libspeex`.
    197 
    198 {{{
    199 # yum install speex-devel
    200 }}}
    201 
    202201=== libtheora ===
    203 Theora video encoder. Requires [#libogg libogg].
     202
     203Theora video encoder. Requires [#libogg libogg]. A more modern alternative is VP8 or VP9 (see [#libvpx libvpx] section).
    204204
    205205Requires `ffmpeg` to be configured with `--enable-libtheora`
     
    220220== Updating ==
    221221
    222 Development of FFmpeg is active and an occasional update can give you new features and bug fixes. First, remove the old files and then update the dependencies:
     222Development of FFmpeg is active and an occasional update can give you new features and bug fixes. First, remove the old files and then update the dependencies:
     223
    223224{{{
    224225rm -rf ~/ffmpeg_build ~/bin/{ffmpeg,ffprobe,ffserver,lame,vsyasm,x264,yasm,ytasm}
     
    264265{{{
    265266rm -rf ~/ffmpeg_build ~/ffmpeg_sources ~/bin/{ffmpeg,ffprobe,ffserver,lame,vsyasm,x264,yasm,ytasm}
    266 # yum erase autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel
     267# yum erase autoconf automake gcc gcc-c++ git libtool nasm pkgconfig zlib-devel
    267268hash -r
    268269}}}
     
    276277
    277278== Also See ==
    278 * [[x264EncodingGuide|x264 Encoding Guide]]
    279 * [[AACEncodingGuide|AAC Encoding Guide]]
     279* [[Encode/H.264|H.264 Video Encoding Guide]]
     280* [[Encode/AAC|AAC Audio Encoding Guide]]