Install and Use FFmpeg on AlmaLinux 9 – Best Steps

In this guide, we want to teach you to Install and Use FFmpeg on AlmaLinux 9. FFmpeg is a free software project that produces libraries and programs for handling and manipulating multimedia data. FFmpeg can handle transcoding, video and image manipulation (resizing, denoising, etc.), packaging, streaming, and playback. It is the most popular video and image processing software by a mile and is used by many companies across various industries.

Now you can proceed to the following guide steps that are provided by the Orcacore team to Install and Use FFmpeg on AlmaLinux 9.

Steps To Install and Use FFmpeg on AlmaLinux 9

To Install and Use FFmpeg on AlmaLinux 9, log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide on Initial Server Setup with AlmaLinux 9.

Install RPM Fusion on AlmaLinux 9

FFmpeg packages aren’t available in the default AlmaLinux 9 repository. So you need to add the RPM fusion repo on your server.

First, update your local package index with the command below:

sudo dnf update -y

Then, install the Epel repository by using the command below:

sudo dnf install epel-release -y

Enable PowerTools by using the following command:

sudo dnf config-manager --set-enabled crb

Now use the following commands to add the RPM Fusion repos on your AlmaLinux 9 repository:

# sudo dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm -y
# sudo dnf install --nogpgcheck https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm -y

Install FFmpeg on AlmaLinux 9

At this point, you can easily use the following command to Install and Use FFmpeg on AlmaLinux 9:

sudo dnf install ffmpeg ffmpeg-devel -y

You can verify your installation by checking its version:

ffmpeg -version
Output
ffmpeg version 5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 11 (GCC)

Also, you can get full information about your FFmpeg by using the command below:

rpm -qi ffmpeg
Output
Name        : ffmpeg
Version     : 5.1.2
Release     : 9.el9
Architecture: x86_64
Install Date: Sat 04 Mar 2023 03:45:48 AM EST
Group       : Unspecified
Size        : 2295097
License     : GPLv3+
Signature   : RSA/SHA256, Fri 13 Jan 2023 04:52:31 AM EST, Key ID 7403ea33296458f3
Source RPM  : ffmpeg-5.1.2-9.el9.src.rpm
Build Date  : Sun 08 Jan 2023 07:50:09 AM EST
Build Host  : buildvm-07.virt.rpmfusion.net
Packager    : RPM Fusion
Vendor      : RPM Fusion
URL         : http://ffmpeg.org/
Summary     : Digital VCR and streaming server
Description :
FFmpeg is a complete and free Internet live audio and video
broadcasting solution for Linux/Unix. It also includes a digital
VCR. It can encode in real time in many formats including MPEG1 audio
and video, MPEG4, h263, ac3, asf, avi, real, mjpeg, and flash.

List Available FFmpeg Encoders and Decoders

At this point that you have learned to Install and Use FFmpeg on AlmaLinux 9, you can now can see all available FFmpeg encoders and decoder types on AlmaLinux 9 with the following commands:

ffmpeg -encoders
Output
Encoders:
 V..... = Video
 A..... = Audio
 S..... = Subtitle
 .F.... = Frame-level multithreading
 ..S... = Slice-level multithreading
 ...X.. = Codec is experimental
 ....B. = Supports draw_horiz_band
 .....D = Supports direct rendering method 1
 ------
 V....D a64multi             Multicolor charset for Commodore 64 (codec a64_multi)
 V....D a64multi5            Multicolor charset for Commodore 64, extended with 5th color (colram) (codec a64_multi5)
 V..... alias_pix            Alias/Wavefront PIX image
 V..... amv                  AMV Video
 V....D apng                 APNG (Animated Portable Network Graphics) image
 V..... asv1                 ASUS V1
 V..... asv2                 ASUS V2
...
ffmpeg -decoders
Output
Decoders:
 V..... = Video
 A..... = Audio
 S..... = Subtitle
 .F.... = Frame-level multithreading
 ..S... = Slice-level multithreading
 ...X.. = Codec is experimental
 ....B. = Supports draw_horiz_band
 .....D = Supports direct rendering method 1
 ------
 V....D 012v                 Uncompressed 4:2:2 10-bit
 V....D 4xm                  4X Movie
 V....D 8bps                 QuickTime 8BPS video
 V....D aasc                 Autodesk RLE
 V....D agm                  Amuse Graphics Movie
 VF...D aic                  Apple Intermediate Codec
 V....D alias_pix            Alias/Wavefront PIX image
 V....D amv                  AMV Video
 V....D anm                  Deluxe Paint Animation
 V....D ansi                 ASCII/ANSI art
 VF...D apng                 APNG (Animated Portable Network Graphics) image
 V....D arbc                 Gryphon's Anim Compressor
 V....D argo                 Argonaut Games Video
 V....D asv1                 ASUS V1
...

At this point, you have installed FFmpeg on your AlmaLinux 9. Now you can start using it.

How To Use FFmpeg on AlmaLinux 9

In this step of this guide on Install and Use FFmpeg on AlmaLinux 9, we will show you how to use FFmpeg with some basic examples.

You don’t have to specify the input and output formats when you are converting the audio and video files with FFmpeg on AlmaLinux 9.

The input file format is auto-detected, and the output format is guessed from the file extension.

For example, to convert a video file from mp4 to webm you can use the following command:

ffmpeg -i input.mp4 output.webm

To convert an audio file from mp3 to ogg you can use the following command:

ffmpeg -i input.mp3 output.ogg

Also, you can use the –c parameter to specify the codecs when you are converting the files.

For example, you can convert a video file from mp4 to webm using the libvpx video codec and the libvorbis audio codec:

ffmpeg -i input.mp4 -c:v libvpx -c:a libvorbis output.webm

To convert an audio file mp3 to ogg encoded with the libopus codec, you can use the following command:

ffmpeg -i input.mp3 -c:a libopus output.ogg

For more details and information about FFmpeg, you can visit the official FFmpeg documentation page.

Conclusion

By following the steps to install and use FFmpeg on AlmaLinux 9, you can effortlessly convert, encode, and manipulate different media formats on your system. Whether you’re a system administrator managing server-side media files or a developer working with multimedia applications, FFmpeg offers robust tools to streamline your workflow. AlmaLinux 9’s compatibility with FFmpeg ensures that you have access to this powerful tool to enhance your media processing tasks efficiently.

Hope you enjoy it. You may also interested in these articles:

Install Tesseract OCR on AlmaLinux 9

Install and Secure Wekan Server on AlmaLinux 9

FAQs

Can I use FFmpeg to convert video formats?

Yes, FFmpeg can convert videos between different formats. For example, to convert a video from MP4 to AVI format, you can use the following command:
ffmpeg -i input.mp4 output.avi

What multimedia formats does FFmpeg support?

FFmpeg supports many multimedia formats such as MP4, AVI, MOV, MKV, MP3, WAV, and many more.

What are the common use cases for FFmpeg on AlmaLinux?

You can use FFmpeg for video and audio conversion, streaming, compressing large files, and extracting audio from videos. It’s also used in broadcasting and media processing pipelines.

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Leave a Reply

Stay informed and not overwhelmed, subscribe now!