1080p in Firefox youtube HTML5 and H.264 support

Now Google has finally decided it was time to make the HTML5 player the default, for all major browsers except the current Firefox version. The reason for that is probably the fact that an HTML5 feature which Youtube’s HTML5 player uses to offer some of its features, Media Source Extensions, is still not activated by default in Firefox 38.

Of course Firefox 38 users can still use the HTML5 player by going to youtube.com/html5 and clicking “Select the HTML5 player”. Without any changes, though, especially if you’re running Firefox on Linux, that page is probably going to look like this:

One thing that may look different on your system is that H.264 might be available if you have the library gst-libav installed. (look left for a tutorial for how to do that)

Now this configuration will already let you watch videos in the HTML5 player, but check out the video resolution selection, and you’ll find that it only offers 360p (or 720p if you have gst-libav installed).

To get full HD you have to enable both Media Source Extensions in general and MSE + WebM in Firefox. To do so, enter in the addressbar of Firefox:

about:config

to get to the advanced configuration page. Click “I’ll be careful, I promise” to continue. Now enter

mediasource

in the search field to see the two options you need. Double-click both “media.mediasource.enabled” and “media.mediasource.webm.enabled” in order to change their value to “true”. Make sure that in the end the page looks like this:

This is how the MSE-related options should be set for Youtube to show Full HD HTML5 videos

Now if you did everything correctly, the Youtube HTML5 page should have at least these boxes checked:

to add H.264 support use this:

The FFmpeg plugin for GStreamer 0.10 is not available in the official Ubuntu 14.04 repositories (because FFMpeg is not available either - libav is used instead) and because of this, Firefox doesn't support the H.264 codec.

Furthermore, without the FFmpeg plugin for GStreamer 0.10 package, KDE apps can't play H.264 videos in Kubuntu 14.04 if they use the GStreamer backend. Another issue with this is that Amarok can't play WMA files. There might also be other affected applications.

To "fix" this, all you need is install the "gstreamer0.10-ffmpeg" package and its dependencies. If you've upgraded from an older Ubuntu version, this package might already be installed but if this is a fresh install, you can get the package from a PPA. Add the PPA and install it using the following commands:

sudo add-apt-repository ppa:mc3man/trusty-media

sudo apt-get update

sudo apt-get install gstreamer0.10-ffmpeg

Now everything should work