This guide is based on a minimal centos installation and Will installffmpeg with several external encoding libraries.
Note:The # indicates that the commandshoshould be executed as superuser or root.
Preparation
Remove any existing packages:
# Yum erase FFMPEG x264x264-devel
Get the dependencies:
# Yum install GCC git makenasm pkgconfig wget
Make a source directory:
Mkdir ~ /FFMPEG-Source
Installation
Yasm
Yasm is an attacker used by x264 and FFMPEG.
Cd ~ /FFMPEG-Source
Wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
Tar xzvf yasm-1.2.0.tar.gz
CD yasm-1.2.0
./Configure
Make
# Make install
Note:If you do not require certainencoders you may skip the relevant section and then remove the appropriate./configure option in FFMPEG. For example, if libtheora is not needed, thenskip that Section
And then remove-- Enable-libtheoraFrom
Install FFMPEGSection.
X264
H.264 video encoder.
Cd ~ /FFMPEG-Source
Git clone git: // git.videolan.org/x264
CD x264
./Configure -- enable-static
Make
# Make install
Lame
MP3 audio encoder.
Cd ~ /FFMPEG-Source
Wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
Tar xzvf lame-3.99.5.tar.gz
CD lame-3.99.5
./Configure -- disable-shared -- enable-NASM
Make
# Make install
Libogg
Required for libtheora and libvorbis.
Cd ~ /FFMPEG-Source
Wget http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.xz
Tar jxvf libogg-1.3.0.tar.xz
CD libogg-1.3.0
./Configure -- disable-shared
Make
# Make install
Libtheora
Theora video encoder.
Cd ~ /FFMPEG-Source
Wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz
Tar xzv flibtheora-1.1.1.tar.gz
CD libtheora-1.1.1
./Configure -- disable-shared
Make
# Make install
Libvorbis
Vorbis Audio Encoder.
Cd ~ /FFMPEG-Source
Wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.gz
Tar xzvf libvorbis-1.3.2.tar.gz
CD libvorbis-1.3.2
./Configure -- disable-shared
Make
# Make install
Vo-aacenc
Visualon AAC audio encoder.
Cd ~ /FFMPEG-Source
Wget http://downloads.sourceforge.net/opencore-amr/vo-aacenc-0.1.1.tar.gz
Tar xzvfvo-aacenc-0.1.1.tar.gz
CD vo-aacenc-0.1.1
./Configure -- disable-shared
Make
# Make install
Libvpx
Vp8 video encoder.
Cd ~ /FFMPEG-Source
Git clone http://git.chromium.org/webm/libvpx.git
CD libvpx
./Configure
Make
# Make install
FFmpeg
Cd ~ /FFMPEG-Source
Git clone git: // source.ffmpeg.org/ffmpeg
CD FFMPEG
./Configure -- enable-GPL -- enable-libmp3lame -- enable-libtheora -- enable-libvo-aacenc -- enable-libvorbis -- enable-libvpx -- enable-libx264 -- enable-version3
Make
# Make install
Compilation is now complete and FFMPEG shocould now be ready to use. therest of this guide shows how to update or remove FFMPEG.
Note:Keep the FFMPEG-source directoryand all contents if you intend to update or uninstall as shown below.
Updating x264, libvpx, and FFMPEG
First uninstall x264, libvpx, and FFMPEG:
Cd ~ /FFMPEG-source/x264
# Make uninstall
Cd ~ /FFMPEG-source/FFMPEG
# Make uninstall
Cd ~ /FFMPEG-source/libvpx
# Make uninstall
Update x264
Cd ~ /FFMPEG-source/x264
Make distclean
Git pull
Then run./configure, make, and make install as shown inInstall x264Section.
Update libvpx
Cd ~ /FFMPEG-source/libvpx
Make clean
Git pull
Then run./configure, make, and make install as shown inInstall libvpxSection.
Update FFMPEG
Cd ~ /FFMPEG-source/FFMPEG
Make distclean
Git pull
Then run./configure, make, and make install as shown inInstall FFMPEGSection.
Reverting changes made by this Guide
Cd ~ /FFMPEG-source/yasm-1.2.0
# Make uninstall
CD ../x264
# Make uninstall
CD ../lame-3.99.5
# Make uninstall
CD./libogg-1.3.0
# Make uninstall
CD./libtheora-1.1.1
# Make uninstall
CD./libvorbis-1.3.2
# Make uninstall
CD ../libvpx
# Make uninstall
CD ../FFMPEG
# Make uninstall
Rm-RF ~ /FFMPEG-Source
# Yum erase GCC git make nasmpkgconfig wget
Https://ffmpeg.org/trac/ffmpeg/wiki/CentosCompilationGuide