mkdir ~/ffmpeg_sources Yasm
Yasm is an assembler used by x264 and FFmpeg.
cd ~/ffmpeg_sources
curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar xzvf yasm-1.3.0.tar.gz
cd yasm-1.3.0
./configure --prefix=/home/yaodezhong/env/local
make
make install
make distclean
. ~/.bash_profile
x264
H.264 video encoder.
cd ~/ffmpeg_sources
git clone --depth 1 git://git.videolan.org/x264
cd x264
./configure --prefix=/home/yaodezhong/env/local --enable-shared --enable-static
make
make install
make distclean
~~~~~~~~~~~~~~~~~~~~~~下面可选
libmp3lame
MP3 audio encoder.
cd ~/ffmpeg_sources
curl -L -O 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 --prefix=/home/yaodezhong/env/local --enable-shared --enable-static --enable-nasm
make
make install
make distclean libfdk_aac
AAC audio encoder.
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/yaodezhong/env/local --enable-shared --enable-static
make
make install
make distclean libvpx
VP8/VP9 video encoder.
cd ~/ffmpeg_sources
git clone --depth 1 http://git.chromium.org/webm/libvpx.git
cd libvpx
./configure --prefix=/home/yaodezhong/env/local --enable-shared --enable-static --disable-examples
make
make install
make clean libogg
Ogg bitstream library. Required by libtheora and libvorbis.
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/yaodezhong/env/local --enable-shared --enable-static
make
make install
make distclean zlib
zlib
cd ~/ffmpeg_sources
curl -O http://zlib.net/zlib-1.2.8.tar.gz
tar -xvf zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure --prefix=/home/yaodezhong/env/local --enable-shared
make
make install
make distclean
cd ~/ffmpeg_sources
git clone --depth 1 git://source.ffmpeg.org/ffmpeg
source ~/.bash_profile_local
cd ffmpeg
./configure --prefix=/home/yaodezhong/env/local --extra-libs="-ldl" --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-shared
make
make install
make distclean
hash -r
source ~/.bash_profile
Additional Libraries
libv4l
yum install libv4l-devel
OR
cd ~/ffmpeg_sources
curl -O http://linuxtv.org/downloads/v4l-utils/v4l-utils-1.6.3.tar.bz2
tar -xvf v4l-utils-1.6.3.tar.bz2
cd v4l-utils-1.6.3
./configure --prefix=/home/yaodezhong/env/local --enable-shared
make
make install
make distclean
libfreetype
cd ~/ffmpeg_sources
curl -O http://download.savannah.gnu.org/releases/freetype/freetype-2.6.tar.bz2
tar -xvf freetype-2.6.tar.bz2
cd freetype-2.6
./configure --prefix=/home/yaodezhong/env/local --enable-shared
make
make install
make distclean libspeex
Speex audio decoder and encoder.
cd ~/ffmpeg_sources
curl -O http://downloads.xiph.org/releases/speex/speexdsp-1.2rc3.tar.gz
tar -xvf speexdsp-1.2rc3.tar.gz
cd speexdsp-1.2rc3
./configure --prefix=/home/yaodezhong/env/local --enable-shared
make
make install
make distclean libtheora
Theora video encoder. Requires libogg.
cd ~/ffmpeg_sources
curl -O http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.gz
tar xzvf libtheora-1.1.1.tar.gz
cd libtheora-1.1.1
./configure --prefix=/home/yaodezhong/env/local --enable-shared --disable-examples --disable-sdltest --disable-vorbistest
make
make install
make distclean