The following installation steps are basically from the official website, make a note to facilitate your own later view
Http://trac.ffmpeg.org/wiki/CompilationGuide
1. Installing dependent Packages
[Python]View Plaincopyprint?
- <span style="FONT-SIZE:14PX;" >yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel</span>
2. New folder to store the source code
mkdir ~/ffmpeg_sources
3. Compile & Install
Yasm
Yasm is a assembler used by x264 and FFmpeg.
[Python]View Plaincopyprint?
- CD ~/ffmpeg_sources
- Curl-o 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--prefix="$HOME/ffmpeg_build"--bindir="$HOME/bin"
- Make
- Make install
- Make Distclean
- Export "path= $PATH: $HOME/bin"
libx264
H. Video Encoder.
[Python]View Plaincopyprint?
- CD ~/ffmpeg_sources
- git clone--depth 1 git://git.videolan.org/x264
- CD x264
- ./configure--prefix="$HOME/ffmpeg_build"--bindir="$HOME/bin"--enable-static
- Make
- Make install
- Make Distclean
Libfdk_aac
AAC Audio Encoder.
[Python]View Plaincopyprint?
- CD ~/ffmpeg_sources
- git clone--depth 1 GIT://GIT.CODE.SF.NET/P/OPENCORE-AMR/FDK-AAC
- CD FDK-AAC
- Autoreconf-fiv
- ./configure--prefix="$HOME/ffmpeg_build"--disable-shared
- Make
- Make install
- Make Distclean
Libmp3lame
Opus Audio decoder and encoder.
[Python]View Plaincopyprint?
- CD ~/ffmpeg_sources
- Curl-o http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz
- Tar xzvf opus-1.1.tar.gz
- CD opus-1.1
- ./configure--prefix="$HOME/ffmpeg_build"--disable-shared
- Make
- Make install
- Make Distclean
Libogg
Ogg Bitstream Library. Required by Libtheora and Libvorbis.
[Python]View Plaincopyprint?
- CD ~/ffmpeg_sources
- Curl-o http://downloads.xiph.org/releases/ogg/libogg-1.3. 1.tar.gz
- Tar xzvf libogg-1.3. 1.tar.gz
- CD libogg-1.3. 1
- ./configure--prefix="$HOME/ffmpeg_build"--disable-shared
- Make
- Make install
- Make Distclean
Libvorbis
Vorbis Audio Encoder. Requires Libogg.
[Python]View Plaincopyprint?
- CD ~/ffmpeg_sources
- Curl-o http://downloads.xiph.org/releases/vorbis/libvorbis-1.3. 4.tar.gz
- Tar xzvf libvorbis-1.3. 4.tar.gz
- CD libvorbis-1.3. 4
- ./configure--prefix="$HOME/ffmpeg_build"--with-ogg="$HOME/ffmpeg_build"--disable-shared
- Make
- Make install
- Make Distclean
Libvpx
VP8/VP9 Video Encoder.
[Python]View Plaincopyprint?
- CD ~/ffmpeg_sources
- git clone--depth 1 https://chromium.googlesource.com/webm/libvpx.git
- CD LIBVPX
- ./configure--prefix="$HOME/ffmpeg_build"--disable-examples
- Make
- Make install
- Make clean
Note: Because the country recently unable to access Google so libvpx cannot git clone, at this time can go elsewhere to download: Http://yunpan.cn/QhNk5tDqQV3MM access password 45f6
Ffmpeg
CD ~/ffmpeg_sourcesgit clone--depth 1 git://source.ffmpeg.org/ffmpegcd ffmpegpkg_config_path= "$HOME/ffmpeg_build/ Lib/pkgconfig "Export pkg_config_path./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-libx264makemake installmake distcleanhash-r. ~/.bash_profile
End of Installation view version:
centos6.5 under compile and install FFmpeg