安装Extra Packages for Enterprise Linux资源库.
$ sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
$ sudo yum install https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-8.noarch.rpm
$ sudo yum install http://rpmfind.net/linux/centos/8-stream/PowerTools/x86_64/os/Packages/SDL2-2.0.10-2.el8.x86_64.rpm
安装FFmpeg和FFmpeg开发包.
# sudo yum install ffmpeg ffmpeg-devel
RPM Fusion 存储库依赖于EPEL 软件存储库。如果您的系统上未启用 EPEL,请键入以下命令启用它:.
sudo yum install epel-release
接下来,通过安装 rpm 包启用 RPM Fusion 存储库 :
$ sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
启用存储库后,安装 FFmpeg:
$ sudo yum install ffmpeg ffmpeg-devel
确认FFmpeg的安装:
$ ffmpeg -version
安装Nux Dextop资源库.
$ sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
$ sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm
安装FFmpeg和FFmpeg开发包.
$ sudo yum install ffmpeg ffmpeg-devel -y
确认FFmpeg的安装:
$ ffmpeg -version
Example: 将MP3音频文件转换为OGG音频文件.
$ cd
$ wget https://archive.org/download/MLKDream/MLKDream_64kb.mp3
$ ffmpeg -i MLKDream_64kb.mp3 -c:a libvorbis -q:a 4 MLKDream_64kb.ogg
例子: 将一个MP4视频文件转换为OGG视频文件。
$ cd
$ wget https://archive.org/30/items/I_Have_A_Dream_Speech_excerpt/I_Have_A_Dream_Speech_excerpt.mpeg4 -O MLKDream.mpeg4
$ ffmpeg -i MLKDream.mpeg4 -codec:v libtheora -qscale:v 3 -codec:a libvorbis -qscale:a 3 -f ogv MLKDream.ogv