How to install Multimedia codecs on openSUSE Linux

If you use Linux for work or pleasure, one of the first things you will have felt the need was to have installed the codecs for multimedia files. Thus having the possibility to see videos online, on YouTube, to listen to all kinds of music, or to create content such as audio and movies.

For all this, it is necessary to install multimedia codecs that are not available in the official repositories. Here then comes Packman to our rescue.

Packman offers various additional packages for openSUSE, especially but not limited to multimedia-related applications and libraries that are on the openSUSE Build Service application blacklist. It’s the largest external repository of openSUSE packages. Packman is comprised of the following four repositories:

  • Essentials: provides codecs and audio and video player applications, to fulfill the most essential needs
  • Multimedia: contains many more multimedia related applications
  • Extra: additional non-multimedia related applications, mostly network-related
  • Games: obviously, games

Installing codecs from Packman repositories

You need to play online or offline multimedia content but the content does not want to play or shows errors. Usually, this is a sign of missing codecs: install these packages from Packman to play most music and video:

  • ffmpeg
  • gstreamer-plugins-good
  • gstreamer-plugins-bad
  • gstreamer-plugins-libav
  • gstreamer-plugins-ugly
  • libavcodec-full
  • vlc-codecs

Of the many methods I’ve tried to install codecs on openSUSE, this is the only one that hasn’t messed with the system or with dependencies. Hence, it is the only method I recommend using.

If you have not already done so, use the following commands to add all of the third-party Packman repository (Packman Essentials is included), according to your installed openSUSE version:

Tumbleweed:

$ sudo zypper addrepo -cfp 90 'https://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/' packman

Leap:

$ sudo zypper addrepo -cfp 90 'https://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_$releasever/' packman

Then, install the desired codecs by first refreshing your local repository database and allowing vendor change for the required packages (consider reading Vendor change):

$ sudo zypper refresh
$ sudo zypper dist-upgrade --from packman --allow-vendor-change
$ sudo zypper install --from packman ffmpeg gstreamer-plugins-{good,bad,ugly,libav} libavcodec-full vlc-codecs

Omit vlc-codecs if you don’t plan on using the VideoLAN Client (VLC).

Cheers!

Resources and references