FFmpeg在CentOS 7核心存储库中不可用,可以使用Nux Dextop存储库中的yum进行安装,如果您的系统上未启用EPEL存储库,请通过键入以下内容启用它:sudo yum install epel-release
接下来,导入存储库GPG密钥并通过安装rpm软件包来启用Nux存储库:sudo rpm -v --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
安装FFmpegsudo yum install ffmpeg ffmpeg-devel
通过运行ffmpeg -version命令验证FFmpeg安装:ffmpeg -version
安装libmp3lamemkdir lame_sources && cd lame_sources
wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
tar xzvf lame-3.99.5.tar.gz
cd lame-3.99.5
./configure
make
make install
lame
安装pythonyum update -y
yum install -y python3
python3
安装youtube-dlyum install youtube-dl
youtube-dl -h
youtube-dl -F https://www.youtube.com/watch?v=anXh6C5bNQw