Netflix on Linux without Silverlight
Netflix HTML5 Player
Netflix is currently the only VoD provider to offer an HTML5 player as well. It works thanks to the full implementation of Encrypted Media Extensions (EME) [10] – but only with Chrome, Internet Explorer, and Safari; that is, on Linux, you must use Google Chrome. Open source browsers Chromium, Firefox, and Opera all lack the EME extension.
Having Chrome as your browser is not enough, however. If Netflix detects (via a message sent by the browser user agent) that you are using Linux, you again end up on the website with the system requirements. Only after tweaking the browser identification using the User Agent Switcher extension [11] for Chrome (Figure 3) does Netflix finally deliver HTML5 video. To accomplish this, install the extension and then set up a matching user agent in the add-on options as per the information in Table 1.
Table 1
User Agent Switcher Options
Option | Value |
---|---|
User-agent name |
Netflix Linux |
User-Agent String |
Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2114.2 Safari/537.36 |
Group |
Chrome |
Append? |
Replace |
Indicator Flag |
IE |
On rolling release distributions (e.g., Arch Linux), Netflix then loads the Linux-friendly HTML5 stream (Figure 4). However, on older or even slightly dated distributions, such as Ubuntu 14.04, you need to install an update for the NSS library published on September 22 to help the browser handle the encryption technology used by Netflix (see the box "Netflix on Ubuntu 14.04").
Netflix on Ubuntu 14.04
Beyond Chrome and the right User-Agent string, Netflix on a Linux system also needs the Network Security Services libraries [12] by Mozilla, version 3.16.2 or later. However, the current Ubuntu 14.04 LTS only came with version 3.15.4. Therefore, despite Chrome and a matching user agent, the screen remains blank on Ubuntu – unless you have smuggled the version of the library used in Ubuntu 14.10 into 14.04.
After a discussion on the ubuntu-devel mailing list [13], Canonical quickly resolved this issue. The library update necessary for Netflix is now in the Security repositories of Ubuntu 12.04 and 14.04, and can be imported as normal security update. In case of difficulties with Netflix, you should thus check first to see whether your Ubuntu has appropriate libnss3
version 3.17-0 or later:
$ dpkg -l libnss3* | grep ii
If you already followed a popular posting on the web and manually updated libnss3 in Ubuntu 14.04, then you can use the commands in Listing 1 to install the original packages. If the download via wget
fails, then Canonical has probably revised the packages in the meantime and changed the version number. In this case, manually download the DEB packages for libnss3 [14], Libnss3-1d [15], and libnss3-nssdb [16] off the web.
Listing 1
Install libnss3 Package
(Make Your Own) Conclusions
Whether the movie and serial offerings from Netflix are superior to those of other VoD providers is something you can only decide for yourself – all of these services offer a free trial period in which to make your own conclusions. That said, the Netflix HTML5 player is a unique selling point for Linux users. Now that Ubuntu 12.04 and 14.04 can officially be updated to meet the system requirements for Netflix, the company has promised to make the user agent query more Linux friendly in the near future [17].
Now Netflix only needs to free itself from the grasp of Chrome for users to access the service directly in Kodi (formerly: XBMC), which would open up a whole new world to the Raspberry Pi. Mozilla would also have to complete its own implementation of EME, which was announced in May 2014 [18], making it the first open source solution for DRM in HTML5 video elements that would run on the Raspberry Pi.
Infos
- "Are young people watching less TV?" MarketingCharts.com: http://www.marketingcharts.com/television/are-young-people-watching-less-tv-24817/
- "Comparison of TV, Online Video and Smartphone Video Viewer Profiles" MarketingCharts.com: http://www.marketingcharts.com/traditional/comparison-of-tv-online-video-and-smartphone-video-viewer-profiles-41217/
- "TV and Media," Ericsson Consumer Insight Summary Report, August 2013: http://www.ericsson.com/res/docs/2013/consumerlab/tv-and-media-consumerlab2013.pdf
- Netflix availability: https://help.netflix.com/en/node/412#where-is-netflix-available-
- Netflix one-month trial: https://help.netflix.com/en/node/412#how-does-the-free-trial-work-
- Chromecast: http://www.google.com/chrome/devices/chromecast/
- Roku Streaming Stick: https://www.roku.com/products/streaming-stick
- Netflix app for Android: https://play.google.com/store/apps/details?id=com.netflix.mediaclient
- "Pipelight" by Christoph Langner, Linux Pro Magazine, issue 165, August 2014, pg. 64, http://www.linuxpromagazine.com/Issues/2014/165/Pipelight-Using-Silverlight-on-Linux
- Encrypted Media Extensions: https://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html
- User Agent Switcher for Chrome: https://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg
- Network Security Services: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
- Ubuntu-devel: Up-rev NSS lib: https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2014-September/015049.html
- Libnss3 from "Trusty": http://packages.ubuntu.com/trusty/libnss3
- Libnss3-1d from "Trusty": http://packages.ubuntu.com/trusty/libnss3-1d
- Libnss3-nssdb from "Trusty": http://packages.ubuntu.com/de/trusty/libnss3-nssdb
- Ubuntu-devel: Lift user agent filtering: https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2014-September/015050.html
- "Reconciling Mozilla's Mission and W3C EME" by Andreas Gal, Mozilla Hacks: https://hacks.mozilla.org/2014/05/reconciling-mozillas-mission-and-w3c-eme/
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.