Solved: VLC could not decode the format “h264”

Posted by

A few days ago, I want to play a video with an mp4 format using VLC on my openSUSE Leap 15.1. When I play the video, I got an error message like below

Codec not supported:
VLC could not decode the format "hevc" (MPEG-H Part2/HEVC (H.265))

Codec not supported:
VLC could not decode the format "mp4a" (MPEG AAC Audio)

Codec not supported:
VLC could not decode the format "h264" (H264 - MPEG-4 AVC (part 10))

Codec not supported:
VLC could not decode the format "mp4a" (MPEG AAC Audio)

The video can be played on my Ubuntu 18.04 very well. But not with my openSUSE Leap. The problem is VLC does not have the codec to play MP4. I try to search for the solution and found it. Here the solution

Add packman repository

zypper ar packman

Refresh and update repository

zypper ref && zypper up

Install VLC Codecs

zypper in vlc-codecs

Maybe you will be asked to change vendors as below. Select 1 (with vendor change) for the solution

Problem: vlc-codecs- requires libavcodec57(unrestricted), but this requirement cannot be provided
  not installable providers: libavcodec57-3.4.5-pm151.4.5.i586[pacman-inode]
 Solution 1: Following actions will be done:
  install libavcodec57-3.4.5-pm151.4.5.x86_64 (with vendor change)
    openSUSE  -->
  install libavdevice57-3.4.5-pm151.4.5.x86_64 (with vendor change)

Below is the process on my openSUSE

The following NEW package is going to be installed:

The following 10 packages are going to be upgraded:
  ffmpeg-3 libavcodec57 libavdevice57 libavfilter6 libavformat57 libavresample3 libavutil55 libpostproc54 libswresample2 libswscale4

The following 10 packages are going to change vendor:
  ffmpeg-3        openSUSE ->
  libavcodec57    openSUSE ->
  libavdevice57   openSUSE ->
  libavfilter6    openSUSE ->
  libavformat57   openSUSE ->
  libavresample3  openSUSE ->
  libavutil55     openSUSE ->
  libpostproc54   openSUSE ->
  libswresample2  openSUSE ->
  libswscale4     openSUSE ->

Then, you should upgrade all codec to the Packman repository with performs this command

zypper dup --from packman

When you run above command, all codec will be changed to Packman repository

Finally, I can play the mp4 video in VLC that run on my openSUSE 🙂



  1. Didn’t work for me, got all these broken dependencies and whatnot. Not sure why anyone uses Linux when the average distro can’t play most videos out of the box and there is no easy universal fix. Like I seriously want to use the most difficult possible OS because I’m really eccentric and only ever do programming but never browse the news or watch videos.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.