VLC Codec Not Supported Fix on Linux

Linux & Unix Beginner 👁 56 views 📅 Jun 24, 2026

VLC on Linux often throws 'codec not supported' for certain video formats. This happens when packages are missing. Here's how to fix it cleanly.

When This Error Shows Up

You're trying to play a video file — maybe an MKV, AVI, or something from a camera. VLC opens but instead of playing, it sits there. You see a popup or an error at the bottom: "Codec not supported" or "VLC cannot play format". Sometimes it just shows a blank screen with audio only. The culprit here is almost always missing codec packages on your Linux system. This happens a lot on fresh installs of Ubuntu, Debian, or Fedora where you didn't install multimedia extras. I've fixed this for dozens of users — 90% of the time it's the same root cause.

What Causes It

VLC on Linux relies on system codec libraries for decoding. These libraries aren't included by default in many distributions because of licensing issues. For example, Ubuntu ships without the libavcodec-extra package which handles H.264, MPEG-4, and other common codecs. Without it, VLC falls back to its internal decoders — and those sometimes just don't work for certain video files. The error message is VLC's way of saying "I don't have the right tool for this job". Don't bother reinstalling VLC, that rarely helps. The real fix is installing the missing backend libraries.

How to Fix It

Here's the step-by-step. I'm assuming Ubuntu or Debian-based system. For Fedora, I'll add those commands too at the end.

  1. Open a terminal. Press Ctrl+Alt+T or search for "Terminal" in your app menu.
  2. Update your package list. Run this command:
    sudo apt update
  3. Install the extra codec package. This one pulls in all the common decoders VLC needs:
    sudo apt install libavcodec-extra

    If you're on Ubuntu 22.04 or later, it's already included in the ubuntu-restricted-extras package. Run this instead if you want the whole set:

    sudo apt install ubuntu-restricted-extras

    This package also includes Microsoft fonts and other stuff. But it's safe. Accept the prompts.

  4. Install VLC codec plugin (optional but recommended). Some codecs are in a separate VLC plugin package:
    sudo apt install vlc-plugin-access-extra
  5. Restart VLC. Close it completely and reopen. Try playing the file again.

For Fedora or RHEL-based Systems

If you're on Fedora, enable RPM Fusion first (their repo for non-free packages). Then run:

sudo dnf install vlc-codec-gstreamer

Or install the full VLC package from RPM Fusion which bundles codecs:

sudo dnf install vlc

If It Still Fails

Sometimes the fix doesn't take right away. Check these things:

  • Did you restart VLC? Sounds dumb but I've seen people leave it open. Close it fully.
  • Is the video file damaged? Try playing it with ffplay (from ffmpeg package). If ffplay shows errors, the file is corrupt. Fix the source, not VLC.
  • Are you on a weird architecture? 32-bit systems need specific packages. Check your architecture with uname -m. For 32-bit, install libavcodec-extra:i386.
  • Did you install from Flatpak or Snap? These versions bundle their own codecs but sometimes miss ones for unusual formats. Switch to the system package version from apt or dnf.

One More Thing

If you're using an older LTS like Ubuntu 20.04, the restricted extras package might not be in the default repos. Run sudo apt install ubuntu-restricted-extras anyway — it'll tell you if it's missing. You can also force install the libdvd-pkg for DVD playback, but that's a separate issue.

This fix has worked for me on every Linux distro from Mint to Arch (on Arch it's sudo pacman -S vlc which pulls everything). Don't overthink it. Codecs not supported = missing libraries. That's it.

Was this solution helpful?