Blog

Unsupported video codec in Firefox on Linux: fixes

Check whether Firefox or Linux lacks a video codec, then work through practical fixes for local files and streaming sites with a browser-based check.

Ryan MitchellHardware tests 4 min read

A video may show an “unsupported codec” message in Firefox on Linux, stay black, or play sound without a picture. The cause could be Firefox, missing media components in Linux, the video file itself, or a streaming site's DRM requirements.

Start by checking what this Firefox installation reports it can play. Browser Info reports browser details, including codec support. It can narrow down the cause, though it cannot confirm that every file or streaming service will work.

Check codec support in Firefox

  1. Open Browser Info in the same Firefox installation where the video fails.
  2. Find the part of the report that lists codecs or supported media features. Note any entries related to the video or audio format you are trying to play.
  3. Try another video that you know plays in Firefox. If possible, test the same video in a different browser on this computer, too.
  4. Compare the results. Note whether the problem affects one file, one website, or every video, and whether you see an error message or a blank player.
  5. After changing a setting or installing a media package, restart Firefox and repeat the test.

A codec is the software used to encode or decode video or audio. The file's container, such as MP4 or WebM, is a wrapper that can hold different codecs. The container name alone does not tell you whether Firefox can play the contents.

What the result means

The codec is not listed as supported

Firefox may not have access to a decoder for that format. On Linux, codec support can depend on the distribution and how Firefox was installed. The next step is to update Firefox and check the media packages recommended for your distribution and package source.

The codec appears supported, but one file still fails

Support in the browser is not a guarantee that every file using that codec will play. The file may use an unsupported profile, be incomplete, or be damaged. Try another file with the same source or ask the sender for a standard MP4 encoded with H.264 video and AAC audio.

Local videos work, but a streaming site does not

The site may require DRM, or Digital Rights Management, which controls playback of protected media. It may also have a site-specific browser requirement. Check the site's playback requirements and Firefox's DRM setting before reinstalling codecs.

Every video fails, including formats that usually work

This points more toward the Firefox installation, its media libraries, or a system-wide playback issue than one unusual file. Update Firefox and Linux, then check whether your Firefox package has access to the required multimedia components.

How to fix it

  1. Reload the video and restart Firefox. A temporary playback or decoder error can clear after you close all Firefox windows and reopen the browser. Make sure the video is not still downloading.
  2. Update Firefox through the same source you used to install it. If you installed Firefox through your Linux distribution, update it with that distribution's software updater or package manager. If it came from a separate package source, update it there instead. Mixing package sources can leave Firefox without the libraries it expects.
  3. Install your distribution's recommended multimedia codecs. Use the official software repositories and follow your distribution's documentation for Firefox playback formats. Package names and licensing options vary. If Firefox is installed as a Flatpak or Snap, check that package's instructions, because installing a library on the host system may not make it available inside the browser package.
  4. Check Firefox's performance settings if playback is distorted or black. In Firefox, open Menu › Settings › General. Under Performance, clear Use recommended performance settings to reveal the hardware acceleration option. Change Use hardware acceleration when available, then restart Firefox and test again. This can help with rendering problems, but it does not add support for a missing codec.
  5. Enable DRM playback only for protected streaming. In Firefox, go to Menu › Settings › General and find Digital Rights Management (DRM) Content. Enable Play DRM-controlled content if the site requires it, then reload the site. This setting does not fix unsupported codecs in ordinary local video files.
  6. Check for an extension or profile issue. Temporarily test in Firefox Troubleshoot Mode, which disables extensions and some custom settings for that session. If playback works there, review extensions that affect video, privacy, or scripts, then test them one at a time.
  7. Try a different copy of the video. If only one file fails in multiple browsers, ask for a fresh copy or a version encoded with a widely supported format. A browser cannot repair a damaged file.

Understand what Browser Info can confirm

Browser Info reads details that Firefox makes available to a web page, including codec and feature support. It does not install decoders, inspect every internal Linux library, or test every possible codec profile. A supported entry is a useful clue, not proof that a specific website's full playback path will work.

For a useful comparison, run the check in the same browser profile and package that has the problem. A distribution-installed Firefox, Flatpak, and Snap can have different access to system media components, even on the same computer. The check runs in your browser, and it does not need to upload a video file.