Last update at :2024-05-16,Edit by888u
FFmpeg is a very popular open source project, used to encode and decode audio and video streams, and is widely used in various streaming services. This tutorial can be used on CentOS 6, 7, and 8 to install the FFmpeg software.
1. Pre-installation requirements
- A Linux VPS with CentOS system installed
- A sudo account is usually the default root account.
- Update system
2. CentOS installation FFmpeg tutorial
1. CentOS 8
Install required dependencies:
$ 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/epel/7/x86_64/Packages/s/SDL2-2.0.10-1.el7.x86_64.rpm
Install FFmpeg:
# sudo yum install ffmpeg ffmpeg-devel
2. CentOS 7
Install Nux Desktop:
$ sudo rpm --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
Install FFmpeg:
$ sudo yum install ffmpeg ffmpeg-devel -y
3. CentOS 6
Install Nux Desktop:
$ 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
Install FFmpeg:
$ sudo yum install ffmpeg ffmpeg-devel -y
3. Test whether the installation is successful
1. View version
$ ffmpeg -version
2. Test sample (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
3. Test sample (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
Recommended site search: How to cancel domain name registration, US host recommendation, Hong Kong hosting, US server defense, hosting space, Korean cheap server, cloud hosting, how to register website, telecom hosting rental, dual line dual IP,
发表评论