标签:需要 tar nbsp 常见问题 -shared ice eol tor har
CentOS 6.5 下安装 ffmpeg
1、安装yasm
官网下载:http://yasm.tortall.net/Download.html
tar -zxvf yasm-1.3.0.tar.gz cd yasm-1.3.0 ./configure make make install
编译参数都是默认的,直接安装到系统中即可
2、安装x264
安装高版本的x264可能会提示需要1.2以上的yasm
官网下载:http://download.videolan.org/pub/videolan/x264/snapshots/
wget http://download.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20170213-2245-stable.tar.bz2 tar -jxf x264-snapshot-20170213-2245-stable.tar.bz2 cd x264-snapshot-20170213-2245-stable/ ./configure --enable-shared make make install
3、安装ffmpeg
官网下载:http://ffmpeg.org/download.html
tar -xjvf ffmpeg-3.3.4.tar.bz2 cd ffmpeg-3.3.4 ./configure --enable-shared --prefix=/usr/local/ffmpeg --enable-libx264 --enable-gpl make make install
这其中 make 编译过程很长,make install 会把ffmpeg相关执行程序、头文件、lib库安装在 /usr/local/ffmpeg/ 下。
安装完成后,进入安装目录,查看发现有:bin、include、lib、share这4个目录
安装中常见问题
ffmpeg -version ffmpeg: error while loading shared libraries: libavdevice.so.57: cannot open shared object file: No such file or directory # 解决办法 vim /etc/ld.so.conf # 添加如下 /usr/local/ffmpeg/lib #执行 ldconfig
ffmpeg -version ffmpeg: error while loading shared libraries: libx264.so.148: cannot open shared object file: No such file or directory # 解决办法 cp /usr/local/lib/libx264.so.148 /usr/lib/
标签:需要 tar nbsp 常见问题 -shared ice eol tor har
原文地址:https://www.cnblogs.com/xi-jie/p/13111681.html