Home Fedora How To Install Multimedia Codecs In Fedora Linux

How To Install Multimedia Codecs In Fedora Linux

By sk
148.6K views

One of the first thing to do after a fresh Fedora installation is to install multimedia codecs to play audio and video. In this brief tutorial, we will see how to install multimedia codecs in Fedora 38 workstation from RPM Fusion software repository.

Introduction

Many multimedia codecs are either closed source or nonfree, so they are not included in the default repositories of Fedora Linux due to legal reasons.

Fortunately, some third party repositories provides the restricted and nonfree multimedia codecs, packages and libraries. One of the popular community-driven, third party repository is RPM Fusion.

If you want to play most audio or video formats in your Fedora desktop, you should install the necessary multimedia codecs from RPM Fusion as outlined below.

Install Multimedia Codecs In Fedora Linux 38

Make sure you have installed RPM Fusion repository in your Fedora machine. If you haven't added it yet, refer the following link to enable RPM Fusion repository in Fedora:

After enabling RPM Fusion, run the following commands one by one to install multimedia codecs in your Fedora system:

$ sudo dnf install gstreamer1-plugins-{bad-\*,good-\*,base} gstreamer1-plugin-openh264 gstreamer1-libav --exclude=gstreamer1-plugins-bad-free-devel

If the above command doesn't work, try the following command instead:

$ sudo dnf install gstreamer1-plugins-{bad-*,good-*,base} gstreamer1-plugin-openh264 gstreamer1-libav --exclude=gstreamer1-plugins-bad-free-devel

Next, run the following commands:

$ sudo dnf install lame* --exclude=lame-devel
$ sudo dnf group upgrade --with-optional Multimedia

These three commands installs pretty much everything to play all audio and video formats in your Fedora system.

If there are any conflicting packages exists, you probably encounter with the following error:

No match for group package "gimp-heif-plugin"
Error: 
 Problem 1: problem with installed package libswscale-free-6.0-4.fc38.x86_64
  - package ffmpeg-libs-6.0-6.fc38.x86_64 conflicts with libswscale-free provided by libswscale-free-6.0-4.fc38.x86_64
  - package ffmpeg-libs-6.0-6.fc38.x86_64 conflicts with libswscale-free provided by libswscale-free-6.0-2.fc38.x86_64
  - package ffmpeg-6.0-6.fc38.x86_64 requires ffmpeg-libs(x86-64) = 6.0-6.fc38, but none of the providers can be installed
  - conflicting requests
 Problem 2: ffmpeg-libs-6.0-6.fc38.i686 has inferior architecture
  - conflicting requests
  - problem with installed package libavcodec-free-6.0-4.fc38.x86_64
  - package ffmpeg-libs-6.0-6.fc38.x86_64 conflicts with libavcodec-free provided by libavcodec-free-6.0-4.fc38.x86_64
  - package ffmpeg-libs-6.0-6.fc38.x86_64 conflicts with libavcodec-free provided by libavcodec-free-6.0-2.fc38.x86_64
  - problem with installed package firefox-112.0.1-1.fc38.x86_64
  - package ffmpeg-libs-6.0-6.fc38.i686 conflicts with libavcodec-free provided by libavcodec-free-6.0-2.fc38.x86_64
  - package ffmpeg-libs-6.0-6.fc38.i686 conflicts with libavcodec-free provided by libavcodec-free-6.0-4.fc38.x86_64
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages)

In that case, simply add --allowerasing flag in the above command to replace conflicting packages and try again.

$ sudo dnf group upgrade --with-optional --allowerasing Multimedia

If the above command doesn't work either, you can add --skip-broken flag to skip uninstallable packages and try again:

$ sudo dnf group upgrade --with-optional --skip-broken Multimedia

Install Multimedia Players

Some popular media players such as VLC, Celluloid, SMplayer and Plex-media-palyer etc., will give all necessary codecs. You don't have install all of them. Any one or two are sufficient. The commands to install these players are given below:

$ sudo dnf install vlc

VLC comes pre-installed in many Linux distributions and it is a standard media player to play all kind of media files.

SMplayer is the front-end for Mplayer and it is considered as best alternative to VLC.

$ sudo dnf install smplayer

If you want more robust multimedia experience, install Plex media player.

$ sudo dnf install plex-media-player

This will not only provide you h264, h265, vp8 and vp9 codecs (all with hardware support), it will also enable av1 (aka av01) a more efficient codec. You can test if your browser supports this codec using the AV1 Beta Launch Playlist.

Some of these players are available as flatpak applications as well. You can install them if you preferred flatpak over the traditional package manager. Most Linux distributions supports flatpak out of the box now.

To install VLC flatpak version, run:

$ flatpak install vlc

Heads Up: Plex-media-player is only available for Fedora 36 and older versions. In recent versions, it has been removed from the RPMFusion repository.

Optional - Install FFmpeg and Youtube-dl

FFmpeg is a powerful multimedia framework that can be used to encode, decode, transcode, mux, demux, record, stream, filter, and play any type of media files. You can get necessary codecs by installing FFmpeg suite on your system.

How To Install FFmpeg In Linux

Youtube-dl is a most popular command line YouTube downloader application. Youtube-dl can be able to download a single track or the entire playlist in one go.

Youtube-dl Tutorial With Examples For Beginners

At this stage, you should have all necessary multimedia codecs to play almost all media files in your Fedora workstation.

Related read:

You May Also Like

2 comments

Paul M July 20, 2021 - 10:53 pm

# dnf install gstreamer1-plugins-{bad-*,good-*,base} gstreamer1-plugin-openh264 gstreamer1-libav –exclude=gstreamer1-plugins-bad-free-devel
Last metadata expiration check: 0:18:03 ago on Tue 20 Jul 2021 18:04:07 BST.
Package gstreamer1-plugins-bad-free-1.19.1-2.1.18.4.fc34.x86_64 is already installed.
Package gstreamer1-plugins-good-gtk-1.19.1-2.1.18.4.fc34.x86_64 is already installed.
Package gstreamer1-plugins-good-qt-1.19.1-2.1.18.4.fc34.x86_64 is already installed.
Package gstreamer1-plugins-base-1.19.1-2.1.18.4.fc34.x86_64 is already installed.
No match for argument: gstreamer1-libav
Error: Unable to find a match: gstreamer1-libav

sk July 21, 2021 - 3:16 pm

Make sure the RPM Fusion repository is enabled and try the following commands:

sudo dnf install gstreamer1-plugins-{bad-\*,good-\*,base} gstreamer1-plugin-openh264 gstreamer1-libav --exclude=gstreamer1-plugins-bad-free-devel

sudo dnf install lame\* --exclude=lame-devel

sudo dnf group upgrade --with-optional Multimedia

Looks like the official installation instructions are changed.

Comments are closed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More