1. 程式人生 > >centos7 安裝ffmpeg

centos7 安裝ffmpeg

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 -version
轉換視訊命令

ffmpeg -i 72Z888piCcTP.mp4 -y a.mp4 

截圖命令

ffmpeg -i test.asf -y -f image2 -t 0.001 -s 352x240 a.jpg