Computing: Computer Administration

Playing MP4 videos on openSuse.

If you try to play an MP4 video (and I guess it's similar for some other video formats), on openSuse, using the default video application (Videos), you'll be disappointed: A popup-message tells you that the H.264 codec is needed, but isn't not installed.

MP4 videos on openSuse: Missing H.264 codec

If you look up the GStreamer Multimedia Codecs - Extra package in Software, you can see that it's installed, but that the only codecs mentioned are: AIFF, DVB, GSM, MIDI, MXF and Opus. What seems not to tell everything, because playing MP3 audio, for example, works well, even though there's nothing indicated about MP3 here.

MP4 videos on openSuse: The installed GStreamer Multimedia Codecs

My first thought was that the missing video codec hadn't been installed, because I was offline, when installing the operating system. But, after an update of the package, nothing had changed.

This situation remembered me the time of Windows 2000 and Windows XP, where for playing most video formats, you had to install some codec pack or, the simplest solution, install VLC player, that included the codecs for a major part of audio and video formats. So, I installed VLC player on my openSuse (you can do it, using YaST), but all I got was another error message, telling me that H.264 is not supported by VLC.

MP4 videos on openSuse: H.264 codec not supported by VLC player

This seems strange: How is it possible that a modern operating system like openSuse Leaf 15.3 isn't capable of playing MP4 videos? I would call the reason being of philosophical nature. openSuse's policy is to only rely on true open source software. That's why, not only the MP4 codecs aren't included on the distribution media, but also aren't included in the official openSuse software repositories.

The solution consists in installing the missing multimedia codecs from the Packman repository. This could be done by adding this repository to the repositories list and installing the codecs using the graphical installer YaST or the command line tool zypper. There is, however, a simpler way: using the OBS Package Installer (OPI). This application searches and installs almost all packages available for openSUSE and SLE (including those from Packman). For details about OPI, please visit the OPI website.

You can install OPI in a terminal by running the command:
    sudo zypper install opi

And with OPI installed, installing the Packman multimedia codecs is really easy. In the terminal, just run the command:
    sudo opi codecs

That's it! OPI does all for you automatically: Adding the Packman repository (you have to confirm if you trust the new signature key temporarily or always; I chose the second one), installs all what's missing and updates packages like GStreamer Multimedia Codecs and VLC player. Note, that there are several other packages that are updated, too; e.g. Lazarus.


If you find this text helpful, please, support me and this website by signing my guestbook.