How to Install FFmpeg on Rocky Linux 8

Install FFmpeg on Rocky Linux 8

In this article, we will have explained the necessary steps to install FFmpeg on Rocky Linux 8. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

FFmpeg is an open-source tool that is in-build solutions to record, stream, convert, set the sample rate, resize the video, and many more. FFmpeg tool is designed for command-line-based processing of video and audio files.

Install FFmpeg on Rocky Linux 8

Step 1. First, before you start installing any package on your Rocky Linux server, we always recommend making sure that all system packages are updated.

sudo dnf install epel-release
sudo yum config-manager --set-enabled PowerTools 
sudo yum-config-manager --add-repo=https://negativo17.org/repos/epel-multimedia.repo
sudo dnf update
sudo dnf upgrade

Step 2. Install FFmpeg on Rocky Linux system.

Now execute the following instructions on your terminal to install FFmpeg and all its components on your Rocky Linux:

sudo dnf install ffmpeg

Check version:

ffmpeg -version

Step 3. FFmpeg Basic Commands.

Here is the list of the FFmpeg basic command options used with ffmpeg command-line tool:

ffmpeg -version:            show version
ffmpeg -formats:            show available formats
ffmpeg -codecs:             show available codecs
ffmpeg -decoders:           show available decoders
ffmpeg -encoders:           show available encoders
ffmpeg -bsfs:               show available bit stream filters
ffmpeg -protocols:          show available protocols
ffmpeg -filters:            show available filters
ffmpeg -pix_fmts:           show available pixel formats
ffmpeg -layouts:            show standard channel layouts
ffmpeg -sample_fmts:        show available audio sample formats

Basic conversion:

  • Convert video files from mp4 to webm:
ffmpeg -i input.mp4 output.webm
  • Convert audio files from mp3 to ogg:
ffmpeg -i input.mp3 output.ogg
  • Convert audio files from mp3 to ogg encoded with libopus codec:
ffmpeg -i input.mp3 -c:a libopus output.ogg

That’s all you need to do to install FFmpeg on Rocky Linux. I hope you find this quick tip helpful. For further reading on the FFmpeg multimedia framework, please refer to their official knowledge base. If you have questions or suggestions, feel free to leave a comment below.