SDB:Firefox MP4/H.264 Video Support

Jump to: navigation, search

If your Firefox cannot play some HTML5 videos, this article can probably solve your problem.

Option 1: Adding the non-free packages via 3rd party repositories

  1. Add Packman Essentials repository (Specially if you're using Leap) or add VLC repository, which contain full-function ffmpeg/libav library.
  2. Install libavcodec56, libavcodec57, libavcodec58, libavformat56, libavformat57, libavformat58, libavdevice56, libavdevice57, libavdevice58 package from Packman or VLC repository. Other libav packages are also recommended.
  3. If you already installed libav packages from openSUSE official repository, switch to Packman or VLC. You can use YaST with following steps:
    1. Search, find and select the package.
    2. Open "Version" tab behind package list.
    3. Choose latest version from Packman/VLC.
    4. If any dependency problem happen, choose solution "Change vendor openSUSE --> Packman / VLC".
    5. Click "Accept" button and install updates.
  4. Restart your Firefox.
  5. It could be better to restart the computer. At least, to close/reopen the current session.
  6. Note: You can achieve the same via command line, ensure your system is up to date prior activation of the Packman repositories and then after enabling them, simply run the following command: "zypper up --allow-vendor-change" as root

This solution works very fine for openSUSE Leap 15.0 on HP Probook 6470b and this is the only one which allows us to view videos on ARTE.TV tv channels and view the Eurosport player TV channel. For Leap 15.1, adding the Packman repositories worked flawlessly.

Option 2: Using the Firefox flatpak

The flatpak includes all necessary packages including the codecs. It's also the latest version of Firefox, which you probably won't have with the system installed version on Leap.

 flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
 flatpak --user install flathub org.mozilla.firefox

To transfer your profile (history, bookmarks, settings, etc), open and close the flatpak version once to make sure the relevant folder is created, then you can copy the contents of ~/.mozilla/firefox/<arbitrary stuff>.default-release/ (openSUSE Firefox) into ~/.var/app/org.mozilla.firefox/.mozilla/firefox/<arbitrary stuff>.default-release/ (flatpak Firefox). Make sure Firefox is closed before copying and pasting this content.

If you are using NVIDIA drivers, you might need to run flatpak update after a system update.

Learn more

As a historical issue, MP4/H.264 becomes a widely used video format on the internet. Many websites provide only MP4 format for HTML5 video stream. So if your web browser doesn't support H.264 codec, these videos cannot be loaded or played.

To deal with patent problems, neither Firefox nor openSUSE provides H264 codec to support. That is why your fresh new openSUSE installation cannot play video on web pages. Luckily, Packman and VLC repositories have these useful packages. If you installed libav libraries, Firefox can detect your system and use available them to decode MP4/H.264 video.

openSUSE provides ffmpeg/libav packages like libavcodec56, but they are "disabled". All patent related codecs were removed, so it is not able to play MP4/H.264 video. That is why you need to upgrade these packages with Packman/VLC's version.

If you want to know if your Firefox supports H.264 video, checkout the following page:

Though Firefox has OpenH264 (by Cisco) plugin, it is NOT used to decode HTML5 video.

Firefox VLC plugin has nothing to do with HTML5 video. It only gives a old way to embed VLC player inside web pages. This plugin is deprecated.

Unofficial Firefox plugins for xine decoders might be broken. If you have problems with them, uninstall these plugins and use ffmpeg/libav instead.