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.