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
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.
-
System76 Unveils an Ampere-Powered Thelio Desktop
If you're looking for a new desktop system for developing autonomous driving and software-defined vehicle solutions. System76 has you covered.
-
VirtualBox 7.1.4 Includes Initial Support for Linux kernel 6.12
The latest version of VirtualBox has arrived and it not only adds initial support for kernel 6.12 but another feature that will make using the virtual machine tool much easier.
-
New Slimbook EVO with Raw AMD Ryzen Power
If you're looking for serious power in a 14" ultrabook that is powered by Linux, Slimbook has just the thing for you.
-
The Gnome Foundation Struggling to Stay Afloat
The foundation behind the Gnome desktop environment is having to go through some serious belt-tightening due to continued financial problems.
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.