Aug 19, 2014

How To Enable HTML5 Playback For Netflix On Ubuntu 14.04 Or 14.10

Netflix supports HTML5 playback (using the Encrypted Media Extensions) but unfortunately, it doesn't work out of the box on Linux for now. However, following a few steps, you can get native Netflix HTML5 video playback through Google Chrome (Beta or Unstable at the time I'm writing this article) in Ubuntu 14.04 or 14.10.

The instructions below are for Ubuntu, but they should work on other Linux distributions as well, as long as you have a recent libnss3 version (tested with libnss3 and libnss3-1d version 3.16.3, libnss-db 2.2.3pre1 and Google Chrome 37 Beta under Ubuntu 14.04).

How to get a native Netflix viewing experience on Ubuntu

1. For Ubuntu 14.04 only: to get Netflix HTML5 to work properly in Google Chrome, you'll need libnss3 from Ubuntu 14.10. The easiest way to install it is to use the PPA below:

sudo add-apt-repository ppa:leonbo/nss
sudo apt-get update
sudo apt-get install libnss3 libnss3-1d libnss3-nssdb

(thanks to Leon Bogaert for the PPA)

If you're on 64bit, you may have some libnss 32bit (multiarch) packages installed so to make sure you get all the required packages, also run an upgrade - either open Software Updater and install all the available updates, or run:

sudo apt-get upgrade

Just in case, log out and log back in once you're done.

2. Install Google Chrome Beta or Dev (Unstable).

Netflix HTML5 requires the Encrypted Media Extensions which are bundled with Google Chrome. So download Google Chrome Beta or Google Chrome Dev from HERE and install it.

Don't worry, if you prefer Chrome stable, you can continue to use it as Chrome Beta or Dev won't replace it (but you can only use Chrome Beta or Dev for Netflix).

Note that Chromium browser won't work. You need Google Chrome!

3. Install the User-Agent Switcher Chrome extension from HERE and in its options, add the following user agent:

Mozilla/5.0 (Windows NT 6.3, Win64, x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2114.2 Safari/537.36

This is required because Netflix doesn't use the HTML5 player on Linux. Using the user agent above, Netflix will detect your browser as Google Chrome 38 for Windows.

4. In your Netflix settings (Your Account > Playback Settings), make sure "Prefer HTML5 player instead of Silverlight" is enabled:

This option was enabled by default in my test, but you should check it anyway in case it's not enabled for you.

5. And finally, from User Agent Switcher, switch to the custom user agent you've set up under step 3, go to Netflix and it should now use the HTML5 player.

How to revert the changes

If for some reason you want to revert the changes made by following the instructions above, here's what you need to do.

To downgrade the packages installed from the PPA used at step 1 (and disable the PPA), use the following commands:

sudo apt-get install ppa-purge
sudo ppa-purge ppa:leonbo/nss

If you also want to remove Google Chrome Beta or Dev, use the commands below:

- for Google Chrome Beta:

sudo apt-get purge google-chrome-beta

- for Google Chrome Dev (Unstable):

sudo apt-get purge google-chrome-unstable

Thanks to Matthew for the tip - instructions adapted via via Reddit & G+

via Web Upd8 - Ubuntu / Linux blog