版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u011003120/article/details/81137744
记录下ubuntu环境下安装FFMPEG的过程,并没有安装全部的FFMPEG相关功能,以后根据需要会不定时进行更新。。。
1.x264安装
Url:http://www.videolan.org/developers/x264.html
ftp://ftp.videolan.org/pub/videolan/x264/snapshots/
tar xvf last_x264.tar.bz2
#./configure --enable-shared --prefix=/usr/
#make
#make install
2.fdk_aac安装
http://sourceforge.net/projects/opencore-amr/files/fdk-aac/
./configure
make
make install
3.x265安装
http://ftp.videolan.org/pub/videolan/x265/
tar xvf x265_2.8.tar.gz
cd build/linux/
cmake ../../source
make
make install
4.编译ffmpeg
使用的最新的ffmpeg源码
git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg
./configure --enable-shared --disable-static --disable-doc --enable-gpl --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-nonfree
make
make install
如果出现lib找不到,可以使用下面两种方法:
1.改动/etc/ld.so.conf
vi /etc/ld.so.conf
在最后加入 /usr/local/lib
然后运行
sudo ldconfig
2.改动LD_LIBRARY_PATH
vim ~/.bashrc
在最后加入export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/
修改说明:
1.20180806
增加libx265安装步骤