在Linux中部署FFmpeg开源视频压缩环境过程简单笔记

下面是在Linux中部署FFmpeg和相关类库全过程的简单记录,如下:

编译安装yasm

tar zxvf ./yasm-1.3.0.tar.gz
cd yasm-1.3.0
./configure
make
make install

编译安装x264

tar xvfj ./x264.tar.bz2
cd x264
./configure --enable-shared
make
make install

编译安装lame

tar zxvf ./lame-3.99.5.tar.gz
cd lame-3.99.5
./configure --enable-shared
make && make install

编译安装libogg

tar zxvf ./libogg-1.3.2.tar.gz
cd libogg-1.3.2
./configure --enable-shared
make && make install

编译安装libvorbis

tar zxvf ./libvorbis-1.3.4.tar.gz
cd libvorbis-1.3.4
./configure
make && make install

编译安装faac

tar zxvf ./faac-1.28.tar.gz
cd faac-1.28
./configure
make && make install

编译安装ffmpeg

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

# 继续编译 qt-faststart
./configure
make tools/qt-faststart
cp -a tools/qt-faststart /usr/bin/

将libx264写进ldconfig

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

阳光部落原创,更多内容请访问 http://www.sunbloger.com/

相关内容:

发表评论