概述
编译方式安装ffmpeg
1.依赖包安装
yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel -y
2.下载安装源
wget http://www.ffmpeg.org/releases/ffmpeg-4.1.tar.gz
2.1解压缩安装包
tar -zxvf ffmpeg-4.1.tar.gz
cd ffmpeg-4.1
./configure --prefix=/usr/local/ffmpeg
2.2编译安装
make && make install
2.3设置环境变量
echo "export PATH=$PATH:/usr/local/ffmpeg/bin" >> /etc/profile
2.4环境变量生效
source /etc/profile
3.查看版本
ffmpeg -version
PS:注意
若安装过程中出现以下错误:
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.
4.需要安装yasm
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar -zxvf yasm-1.3.0.tar.gz
cd yasm-1.3.0 # ./configure
make && make install
5.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
最后
以上就是高高宝贝为你收集整理的最简单直接在centos7安装ffmpeg的全部内容,希望文章能够帮你解决最简单直接在centos7安装ffmpeg所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复