CentOS7安装ffmpeg

CentOS7安装ffmpeg

编译方式安装ffmpeg

依赖包安装

yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel -y

下载安装源

wget http://www.ffmpeg.org/releases/ffmpeg-4.1.tar.gz

解压缩安装包

tar -zxvf ffmpeg-4.1.tar.gz
cd ffmpeg-4.1
./configure --prefix=/usr/local/ffmpeg

编译安装

make && make install

设置环境变量

echo "export PATH=$PATH:/usr/local/ffmpeg/bin" >> /etc/profile

环境变量生效

source /ect/profile

查看版本

ffmpeg -version
注意
若安装过程中出现以下错误:
yasm/nasm not found or too old. Use –disable-yasm for a crippled build.
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file “config.log” produced by configure as this will help
solve the problem.
需要安装yasm

yum方式安装ffmpeg

centos7
rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
yum install ffmpeg ffmpeg-devel -y

centos6
rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm
yum install ffmpeg ffmpeg-devel -y

posted @ 2021-09-29 09:15  霸都运维  阅读(431)  评论(0编辑  收藏  举报