linux安装ffmpeg支持libx264

1.下载x264
git clone https://code.videolan.org/videolan/x264.git

2.编译x264
cd x264/
./configure --prefix=/usr/local/x264 --enable-shared --enable-static --disable-asm
排错:提示错误
安装gcc:yum -y install gcc gcc-c++ kernel-devel

3.安装ffmpeg,找到需要的版本
wget http://www.ffmpeg.org/releases/ffmpeg-3.4.13.tar.gz

4.编译
./configure --prefix=/usr/local/ffmpeg --enable-shared --disable-yasm --enable-libx264 --enable-gpl
make && make install

5.添加环境变量
/etc/profile
export PATH=“/usr/local/ffmpeg/bin:$PATH”
source /etc/profile

安装ffmpeg几个常见的错误
1.error while loading shared libraries: libx264.so.164: cannot open shared object file: No such file or directory
解决:在/etc/ld.so.conf加上如下
/usr/local/x264/lib
/usr/local/ffmpeg/lib
ldconfig文章来源地址https://uudwc.com/A/R63ek

原文地址:https://blog.csdn.net/weixin_45290734/article/details/133077240

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请联系站长进行投诉反馈,一经查实,立即删除!

上一篇 2023年09月23日 18:26
下一篇 2023年09月23日 18:26