CentOS 6&7 安装 ffmpeg

kyle 2018-02-06 2994次浏览 0条评论 0 打赏作者 0 0

CentOS 6和7 安装方法是不一样的,下面分别说明:

安装前都需要先安装epel扩展源
yum -y install epel-release

CentOS 6比较简单,安装yum源之后直接安装即可:

su -c 'yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-6.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-6.noarch.rpm'
yum -y install ffmpeg ffmpeg-devel

CentOS 7 需额外安装扩展源:

su -c 'yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-7.noarch.rpm'
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-1.el7.nux.noarch.rpm
yum -y install ffmpeg ffmpeg-devel

至此ffmpeg已安装完成,可测试一下:

#将amry格式转为mp3
ffmpeg -y -i origin.amr new.mp3

#PHP代码中执行
exec("ffmpeg -y -i origin.amr new.mp3");
0

0 条评论

    没有找到数据。

发表评论

kyle
土豪

kyle

注册时间:2016-10-28
最后登录:4小时前
发布
带到手机上看