Learn how to – How To Install FFmpeg on CentOS 8 / RHEL 8.
Question: How can install FFmpeg on CentOS 8 / RHEL 8 Linux system?. FFmpeg is a free and open source multimedia framework used to play, encode, decode, stream, transcode, mux, demux, and filter different formats of multimedia files including MPEG1 audio and video, MPEG4, h263, ac3, asf, avi, real, mjpeg, and flash.
FFmpeg is a cross-platform application as it can run on Linux, macOS, Windows, BSDs, Solaris, etc, under wide variety of build environments, configurations and machine architectures. Most media players available for Linux and Audio/Video downloaders and converters such as youtube-dl require FFmpeg to work.
FFmpeg Tools
These are the main FFmpeg building blocks:
- ffmpeg – Command line tool to convert multimedia files between formats
- ffplay – Simple media player based on SDL and the FFmpeg libraries
- ffprobe – Simple multimedia stream analyzer
FFmpeg also contain Libraries for developers – libavutil, libavcodec,
libavformat, libavdevice, libavfilter, libswscale and libswresample.
The transcoding process in ffmpeg
for each output can be described by the following diagram:
How To Install FFmpeg on CentOS 8 / RHEL 8
Follow the next steps discussed here to install FFmpeg on CentOS 8 / RHEL 8 Linux distribution. You should have access to your CentOS / RHEL 8 system before you continue.
Step 1: Install RPMfusion Yum Repository
The RPM Fusion repository was created to provide software not shipped by Fedora and Red Hat based distributions. All software applications available in this repository are provided as precompiled RPM files. We’ll install FFmpeg on CentOS 8 / RHEL 8 from RPMfusion repository.
You need to enable EPEL on RHEL or compatible distributions like CentOS before you enable RPM Fusion for EL.
Enable EPEL repository:
### Rocky Linux 8 / AlmaLinux 8 ###
sudo dnf install epel-release
sudo dnf config-manager --set-enabled powertools
### CentOS 8 Stream ###
sudo dnf install epel-release epel-next-release
sudo dnf config-manager --set-enabled powertools
### RHEL 8 ###
sudo dnf -y install https://download.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
Then add RPMfusion Yum Repository:
sudo dnf install -y https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm
sudo dnf install -y https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-8.noarch.rpm
Accept installations.
...........................
Dependencies resolved.
===================================================================================================================================================
Package Arch Version Repository Size
===================================================================================================================================================
Installing:
rpmfusion-free-release noarch 8-0.1 @commandline 11 k
Transaction Summary
===================================================================================================================================================
Install 1 Package
Total size: 11 k
Installed size: 3.7 k
Is this ok [y/N]: y
.........................
Dependencies resolved.
===================================================================================================================================================
Package Arch Version Repository Size
===================================================================================================================================================
Installing:
rpmfusion-nonfree-release noarch 8-0.1 @commandline 11 k
Transaction Summary
===================================================================================================================================================
Install 1 Package
Total size: 11 k
Installed size: 3.8 k
Is this ok [y/N]: y
Step 2: Install FFmpeg on CentOS 8 / RHEL 8 Linux
Once you’ve added EPEL and RPM Fusion repositories, run the following commands in your terminal to install FFmpeg on CentOS 8 / RHEL 8 Linux system.
sudo dnf -y install ffmpeg
A number of dependencies will be installed, verify and agree to installation.
....
Transaction Summary
======================================================================================================================================================================================================
Install 92 Packages
Total download size: 32 M
Installed size: 102 M
Is this ok [y/N]: y
Install development libraries by running the command:
sudo dnf -y install ffmpeg-devel
Step 3: Check FFmpeg Version on CentOS / RHEL 8
Check the version of FFmpeg installed on your RHEL/CentOS system using the command.
$ rpm -qi ffmpeg
Name : ffmpeg
Version : 4.2.9
Release : 1.el8
Architecture: x86_64
Install Date: Mon 15 May 2023 09:03:06 AM UTC
Group : Unspecified
Size : 1932272
License : GPLv2+
Signature : RSA/SHA256, Tue 25 Apr 2023 03:13:32 PM UTC, Key ID 979f0c69158b3811
Source RPM : ffmpeg-4.2.9-1.el8.src.rpm
Build Date : Sat 22 Apr 2023 04:41:08 PM UTC
Build Host : buildvm-01.online.rpmfusion.net
Relocations : (not relocatable)
Packager : RPM Fusion
Vendor : RPM Fusion
URL : http://ffmpeg.org/
Summary : Digital VCR and streaming server
...
Check that you can use ffmpeg
command:
$ ffmpeg -version
ffmpeg version 4.2.9 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 8 (GCC)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librsvg --enable-libsrt --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-libzvbi --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
libpostproc 55. 5.100 / 55. 5.100
Step 4: Using FFmpeg on CentOS / RHEL 8
The usage of ffmpeg depends on individual projects and desired output. Refer to the official FFmpeg documentation for an in-depth description of its features and examples.
Other example is Converting mp4/mkv/WebM to mp3 on Linux with FFmpeg
If you want to download Videos from YouTube, check:
You can also get all command line options from:
$ ffmpeg --help
Thank you for using our guide to install FFmpeg on CentOS 8 / RHEL 8. Check other articles,
- Best LPIC-1 and LPIC-2 certification study books
- Best Linux Books for Beginners & Experts
- How To Setup a TFTP server on CentOS 8 / RHEL 8
- How To Install GLPI on CentOS 8 / RHEL 8
Leave a Reply
You must be logged in to post a comment.