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.

Figure 3: The User Agent Switcher fools Netflix into thinking it is talking to a Windows machine using Chrome as its browser.

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").

Figure 4: With Chrome and the correct user agent, Netflix delivers a Linux-friendly HTML5 stream.

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

  1. "Are young people watching less TV?" MarketingCharts.com: http://www.marketingcharts.com/television/are-young-people-watching-less-tv-24817/
  2. "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/
  3. "TV and Media," Ericsson Consumer Insight Summary Report, August 2013: http://www.ericsson.com/res/docs/2013/consumerlab/tv-and-media-consumerlab2013.pdf
  4. Netflix availability: https://help.netflix.com/en/node/412#where-is-netflix-available-
  5. Netflix one-month trial: https://help.netflix.com/en/node/412#how-does-the-free-trial-work-
  6. Chromecast: http://www.google.com/chrome/devices/chromecast/
  7. Roku Streaming Stick: https://www.roku.com/products/streaming-stick
  8. Netflix app for Android: https://play.google.com/store/apps/details?id=com.netflix.mediaclient
  9. "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
  10. Encrypted Media Extensions: https://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html
  11. User Agent Switcher for Chrome: https://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg
  12. Network Security Services: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
  13. Ubuntu-devel: Up-rev NSS lib: https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2014-September/015049.html
  14. Libnss3 from "Trusty": http://packages.ubuntu.com/trusty/libnss3
  15. Libnss3-1d from "Trusty": http://packages.ubuntu.com/trusty/libnss3-1d
  16. Libnss3-nssdb from "Trusty": http://packages.ubuntu.com/de/trusty/libnss3-nssdb
  17. Ubuntu-devel: Lift user agent filtering: https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2014-September/015050.html
  18. "Reconciling Mozilla's Mission and W3C EME" by Andreas Gal, Mozilla Hacks: https://hacks.mozilla.org/2014/05/reconciling-mozillas-mission-and-w3c-eme/

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • NetFlix Talks the Cloud and HTML5

    Netflix's Director of Web Engineering discusses HTML5, but not for video.

  • Kodi 18.0 and LibreELEC 9.0

    Thanks to Kodi 18.0, LibreELEC 9.0 now supports the DRM encryption used by many streaming services. However, integrating Netflix, Amazon, and other streaming services does involve some manual work.

  • Web Cryptography API

    The controversial Web Cryptography API offers flexible encryption for web applications, but it also lays the groundwork for content providers to implement more powerful access restrictions through DRM.

  • Pipelight: Using Silverlight on Linux

    Video-on-demand services often don't play well with Linux because they depend on Microsoft's Silverlight browser plugin. Luckily, you can call on the Wine offshoot Pipelight to rescue your next home movie night.

  • W3C Promotes Media Source Extensions

    HTML technology will enable new video editing and playback options.

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95

News