下面是在Linux中部署FFmpeg和相关类库全过程的简单记录,如下:
tar zxvf ./yasm-1.3.0.tar.gz
cd yasm-1.3.0
./configure
make
make install
tar xvfj ./x264.tar.bz2
cd x264
make clean
./configure --enable-shared
make
make install
tar zxvf ./lame-3.99.5.tar.gz
cd lame-3.99.5
./configure --enable-shared
make && make install
tar zxvf ./libogg-1.3.2.tar.gz
cd libogg-1.3.2
./configure --enable-shared
./configure
make && make install
tar zxvf ./libvorbis-1.3.4.tar.gz
cd libvorbis-1.3.4
./configure
make && make install
tar zxvf ./faac-1.28.tar.gz
cd faac-1.28
./configure
make
make install
tar xvfj ./ffmpeg-2.5.1.tar.bz2
cd ffmpeg-2.5.1
./configure --prefix=/usr/local/ffmpeg2 --enable-libmp3lame --enable-libvorbis --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libfaac --enable-libx264 --enable-postproc --enable-ffserver --enable-ffplay
make
make install
./configure
make tools/qt-faststart
cp -a tools/qt-faststart /usr/bin/
locate libx264.so.142 #会显示/usr/local/lib/libx264.so.142
ln -s libx264.so.142 libx264.so
vi /etc/ld.so.conf.d/libx264.conf #写入/usr/local/lib
ldconfig