CentOS Linux系统安装FFmpeg步骤
一、在CentOS Linux系统中安装FFmpeg
第一步是获取软件包并进行解压处理
wget http://www.ffmpeg.org/releases/ffmpeg-3.1.tar.gz
tar -zxvf ffmpeg-3.1.tar.gz
第二步,进入解压生成的目录,执行以下命令进行配置,其中/usr/local/ffmpeg为自定义的安装目标路径
cd ffmpeg-3.1
./configure --prefix=/usr/local/ffmpeg
make && make install
第三步,配置系统环境变量以确保全局可用
vi /etc/profile
在最后PATH添加环境变量:
export PATH=$PATH:/usr/local/ffmpeg/bin
保存退出
查看是否生效
source /ect/profile 设置生效
第四步,验证安装结果并查看版本信息
ffmpeg -version 查看版本
注意事项:
如果在安装过程中遇到如下报错信息:
提示yasm或nasm未找到或版本过旧,建议使用–disable-yasm选项构建功能受限的版本。
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工具
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
二、在Debian系统中安装FFmpeg
第一步,编辑/etc/apt/sources.list文件,追加以下内容以添加第三方源
deb http://www.deb-multimedia.org jessie main
第二步,执行安装命令获取FFmpeg
sudo apt-get update
sudo apt-get install deb-multimedia-keyring
sudo apt-get install ffmpeg
至此,关于Linux下安装FFmpeg的详细教程已介绍完毕,更多相关linux安装ffmpeg内容请搜索本站以前的文章或继续浏览下面的相关文章希望大家以后多多支持本站!