How to install FFmpeg on Fedora Linux 33/34 using dnf

When I type ffmpeg -i input output.mp4 on Fedora Linux, I get an error: “bash: ffmpeg: command not found…”. How do I install ffmpeg on Fedora Linux 28 or 29/33/34 workstations?

Introduction – FFmpeg is an open source and free software for managing video, audio, and other multimedia files and streams on Linux and Unix-like systems. One can use ffmpeg command for transcoding, video editing, scaling, and much more. This page shows how to install ffmpeg on Fedora Linux using dnf command-line options.
Tutorial details
Difficulty level Easy
Root privileges Yes
Requirements Fedora Linux
Est. reading time 3 minutes

Install FFmpeg on Fedora Linux 33/34

The procedure to enable and install FFmeg on Fedora is as follows:

  1. Open the terminal application.
  2. Enable and configure RPM Fusion repo using the dnf command
  3. Install FFmpeg in Fedora Linux, run: sudo dnf install ffmpeg
  4. To upgrade FFmpeg on Fedora, run: sudo dnf upgrade ffmpeg
  5. Test ffmpeg command on Fedora

Let us see all commands and examples in details.

How to configure RPM Fusion repo on Fedora Linux

RPM Fusion is a software repository that gives additional packages for the Fedora, RHEL and CentOS Linux. Open the terminal application. Type the following dnf command to enable RPM Fusion repo:

sudo dnf install \$(rpm -E %fedora).noarch.rpm \$(rpm -E %fedora).noarch.rpm

Configure RPM Fusion yum repository on Fedora Linux

Just run:
$ sudo dnf update
Now we have a repo configured and working. Verify that ffmpeg available for installation on Fedora:
$ dnf search ffmpeg
$ dnf info ffmpeg

DNF command to search for ffmpeg package on Fedora Linux

Fedora Linux install FFmpeg

Install ffmpeg using dnf command as follows:
$ sudo dnf install ffmpeg

Installing FFmpeg on my Fedora Linux 29 desktop

Verify FFmpeg installation

Simply run the following command:
ffmpeg -h
ffmpeg -version

Sample outputs:

ffmpeg version 4.3.2 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10 (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 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -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,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' -I/usr/include/rav1e' --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-liblensfun --enable-libmp3lame --enable-libmysofa --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librav1e --enable-libsmbclient --enable-version3 --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx --enable-vulkan --enable-libglslang --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxml2 --enable-libzimg --enable-libzvbi --enable-lv2 --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-lto --enable-libmfx --enable-runtime-cpudetect
libavutil      56. 51.100 / 56. 51.100
libavcodec     58. 91.100 / 58. 91.100
libavformat    58. 45.100 / 58. 45.100
libavdevice    58. 10.100 / 58. 10.100
libavfilter     7. 85.100 /  7. 85.100
libavresample   4.  0.  0 /  4.  0.  0
libswscale      5.  7.100 /  5.  7.100
libswresample   3.  7.100 /  3.  7.100
libpostproc    55.  7.100 / 55.  7.100

How do I use ffmpeg command on Fedora Linux

The basic syntax is:
ffmpeg -i input.file output.file
ffmpeg [input_options] -i input.file output.file
ffmpeg [input_options] -i input.file [output_options] output.file

Say you have a PNG file and want it converted into a JPG file, run:
ffmpeg -i input.png output.png
ls -l input.png output.png
xdg-open output.png

In this example, convert an MP3 file and into an OGG file:
ffmpeg -i music.mp3 music.ogg
Next, convert an MP4 video to a GIF or WEBM format:
ffmpeg -i clip.mp4 video.gif
ffmpeg -i clip.mp4 video.webm


That was a quick introduction on how to install and use ffmpeg on Fedora Linux. The ffmpeg has many more options, see -h option to get full help or, even better, run the following man command (or see documenation online):
$ man ffmpeg
$ ffmpeg -h

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 1 comment so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
1 comment… add one
  • Una Cohen May 3, 2021 @ 10:30

    When I ran dnf install ffmpeg command on Fedora server, it said

    RPM Fusion for Fedora 33 - Free - Updates      115 kB/s | 409 kB     00:03    
    RPM Fusion for Fedora 33 - Free                393 kB/s | 897 kB     00:02    
    RPM Fusion for Fedora 33 - Nonfree - Updates    43 kB/s |  70 kB     00:01    
    RPM Fusion for Fedora 33 - Nonfree             124 kB/s | 278 kB     00:02    
    Dependencies resolved.
     Package             Arch   Version               Repository              Size
     ffmpeg              x86_64 4.3.2-2.fc33          rpmfusion-free-updates 1.5 M
    Installing dependencies:
     SDL2                x86_64 2.0.14-1.fc33         updates                557 k
     alsa-lib            x86_64 1.2.4-5.fc33          updates                475 k
     avahi-libs          x86_64 0.8-7.fc33            updates                 67 k
     cairo               x86_64 1.16.0-9.fc33         fedora                 692 k
     cairo-gobject       x86_64 1.16.0-9.fc33         fedora                  18 k
     cups-libs           x86_64 1:2.3.3op2-4.fc33     updates                276 k
     dejavu-sans-fonts   noarch 2.37-15.fc33          fedora                 1.3 M
     ffmpeg-libs         x86_64 4.3.2-2.fc33          rpmfusion-free-updates 8.3 M
     flac-libs           x86_64 1.3.3-4.fc33          updates                223 k
     fontconfig          x86_64 2.13.92-12.fc33       fedora                 268 k
     fonts-filesystem    noarch 1:2.0.5-4.fc33        fedora                 8.7 k
     vid.stab            x86_64 1.1.0-15.20190213gitaeabc8d.fc33
                                                      fedora                  49 k
     vo-amrwbenc         x86_64 0.1.3-13.fc33         rpmfusion-free          77 k
     vulkan-loader       x86_64      updates                124 k
     x264-libs           x86_64 0.160-2.20200702gitcde9a93.fc33
                                                      rpmfusion-free         676 k
     x265-libs           x86_64 3.4-3.fc33            rpmfusion-free         1.2 M
     xml-common          noarch 0.6.3-55.fc33         fedora                  31 k
     xvidcore            x86_64 1.3.7-4.fc33          rpmfusion-free         256 k
     zimg                x86_64 3.0.1-2.fc33          updates                293 k
     zvbi                x86_64 0.2.35-11.fc33        fedora                 421 k
    Installing weak dependencies:
     logrotate           x86_64 3.17.0-3.fc33         fedora                  76 k
    Transaction Summary
    Install  126 Packages
    Total download size: 84 M
    Installed size: 308 M
    Is this ok [y/N]:

    126 package? That seems a lot for server. But I went ahead and installed it as I need ffmpeg cli for my webapp ;)

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum