h.264 HTML5 video in Firefox on Fedora 20

Please check out rpmfusion.org for all the usual disclaimers. Some of the software needed for h.264 is for non-commercial use only and/or patent encumbered.

Fedora now ships with Firefox 31 that has gstreamer1 support enabled. That means that you can finally use HTML5 h264 video on youtube and vimeo if you install a few codecs. This snippet should work even on freshly installed Fedora 20.

This post should apply to other Linux distributions as well but the packages names will be different. Type about:buildconfig into the address bar in Firefox. If it contains –enable-gstreamer=1.0 you are good to go.

# only if you don't have rpmfusion enabled already
yum localinstall http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

yum install gstreamer1-libav gstreamer1-vaapi gstreamer1-plugins-{good,good-extras,ugly} -y

# only if you want bad plugins
# yum install gstreamer1-plugins-bad-free gstreamer1-plugins-bad-freeworld -y

Now restart Firefox and test the h264 support. You can use https://www.youtube.com/html5 for testing, the h264 bar should be green. Or try looking at any vimeo video.

If your firefox does not play h.264 videos at this point, check that you really installed gstreamer1 plugins and not the “gstreamer 0.10”. These are prefixed with just gstreamer- in Fedora.

UPDATE: This works on Fedora 21 as well.
UPDATE: This works on Fedora 22 as well.
UPDATE: This works on Fedora 23 as well.
UPDATE: This works on Fedora 24 as well.

17 thoughts on “h.264 HTML5 video in Firefox on Fedora 20”

  1. Be careful – you should never ever install unsigned packages downloaded over a unencrypted connection – anyone could manipulate what you install as root. Why would you want to be so careless? rpmfusion packages are signed, just use the signature.

  2. This does NOT work in F21. I just followed the instructions and youtube still reports h264 is not supported. I am using Firefox 35.

    1. Make sure you really have the right packages and make sure you really restarted Firefox. Sometimes firefox keeps running in the background and executing `firefox` again just spawns a new window.

      If that still doesn’t work I will need way more diagnostic info to help.

  3. Hi there,
    I have an issue with missing H264 support in Firefox Aurora. Firefox from official repositories is working correctly. I have all mentioned packages installed, some of them self-compiled because of dependency issues with rpmfusion on Fedora 22.

    Is there any way how to diagnose why is h264 support not available? I’ve already tried cleaning gstreamer cache.


    1. Aurora should support gstreamer1 but maybe your build of it doesn’t. Does about:buildconfig contain –enable-gstreamer=1.0?

      I am afraid I am not aware of any convenient way to diagnose this.

      1. No, that build flag isn’t there. And I have built some gstreamer parts myself (not Aurora), Aurora is just official binary distributed by Mozilla.

          1. I thought it was caused by this. I’ve googled a little and found some (closed & fixed) bug reports about building with gstreamer by default but it was probably only for stable. So, I am probably going to self-compile Aurora.

            Many thanks.

  4. Note that since version 46 Firefox uses ffmpeg rather than gstreamer1 to play h264 videos.

    So you need free rpmfusion and
    dnf install ffmpeg-libs

  5. F27 with Firefox 57, about:buildconfig doesn’t mention gstreamer but H.264 still works once the gstreamer1 plugins are installed from rpmfusion.

Leave a Reply

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

Time limit is exhausted. Please reload CAPTCHA.