How to watch Netflix on the Raspberry Pi

How to watch Netflix on the Raspberry Pi

For such an affordable device, there’s a lot that the Raspberry Pi can do. One of the simplest and most useful ways to use your Pi is as a low-cost alternative to a Roku or Fire TV. You can load programs like Plex and Kodi onto a Raspberry Pi to create an affordable media center device, but even those simple projects aren’t strictly necessary if you’re just looking to watch Netflix on a Raspberry Pi. While the Pi can’t quite get the job done right out of the box, giving your Pi the power to stream Netflix is pretty simple. Here’s how to watch Netflix on a Raspberry Pi.

What we’re going to do is use the Raspbian operating system to run the Chromium browser and open Netflix in Chromium on your Raspberry Pi.

For a while now, The Raspberry Pi Foundation’s Raspbian disk image has included the PIXEL desktop. PIXEL stands for “Pi Improved Xwindows Environment, Lightweight.” The image comes with Chromium, an open-source browser developed by Google. Chromium is what Chrome is based on, so it can do a lot of the same things its big brother can do – including some things that Epiphany, Raspbian’s old default browser, can’t do.

Why this is important? Because Netflix doesn’t support Epiphany, but it does support Chrome.

Unfortunately, Chrome and Chromium aren’t exactly the same, and you can’t watch Netflix using Chromium out of the box. If you try to, you’ll be greeted with a screen like this:

Netflix: Missing component

That’s no good. The error says that you are missing a required component to watch Netflix. That component is called Widevine Content Decryption Module.

That may sound like some weird third-party plugin, but it’s not – it’s actually included in Chrome out of the box. If you’ve ever used Chrome to stream Netflix, you’ve already used this plugin without knowing it. It’s just that while this plugin is standard with Chrome, it’s not standard with Chromium.

So what we need to do is get a version of Chromium that includes this Chrome plugin. Let’s do it!

 

How to watch Netflix on the Raspberry Pi

Step 1: Install Raspbian

We’ll be doing this entire project in the Raspbian operating system, so start by downloading the Raspbian disk image and writing it to a microSD card to use in your Raspberry Pi. If you’re not familiar with this process, I have good news – we’ve written an entire guide to installing Raspbian on your Raspberry Pi.

 

Step 2: Install Chromium with Widevine Support

In an older version of this post, we had you download and run Google Chrome OS’s recovery script to get Widevine working on Chromium. Unfortunately, that doesn’t seem to work anymore – the current version of Google Chrome OS’s recovery script doesn’t work with the current version of Chromium. Fortunately, there’s another way to get this done, and we’ve updated our guide accordingly.

What we can do is download and install a version of Chromium that has already been compiled with Widevine Support. Open up a terminal window in Raspbian and enter these two lines in order:

wget https://github.com/kusti8/chromium-build/releases/download/netflix-1.0.0/chromium-browser_56.0.2924.84-0ubuntu0.14.04.1.1011.deb
sudo dpkg -i chromium-browser_56.0.2924.84-0ubuntu0.14.04.1.1011.deb

Easy enough, right?

 

Step 3: Not done yet!

So we’ve got the plugin installed – this should work now, right? Not so fast. Try to play something on Netflix and you’ll be greeted by this error:

Netflix: Unexpected error

So, what’s wrong?

We have to do one more step and install a Chrome extension called “User-Agent Switcher for Chrome.” That is because we need to lie Netflix a bit and have it believe that we are using Chrome OS.

So, head over to the Chrome Webstore and install the extension. Next, we’ll just need to enter some values in the extension.

 

Step 4: Create a new user-agent string

After installing, open the extension’s options and create a new user-agent string like this:

User-Agent Switcher for Chrome

New user-agent name:
Netflix

New user-agent string:
Mozilla/5.0 (X11; CrOS armv7l 6946.63.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36

Group:
Chrome

Append?
Replace

Indicator flag:
IE

Then click the extension’s icon and select Chrome > Netflix.

That’s it! Now you should be able to watch Netflix without issues.

Netflix: Breaking Bad

 

Optional

  • If you open Netflix from Terminal using chromium-browser https://www.netflix.com, you may see an error message that says something like “Failed to call method: org.freedesktop.UPower.EnumerateDevices.” To fix this, you can install UPower, a piece of middleware that deals with power management on Linux systems. To install UPower, just head back to Terminal and type sudo apt-get install upower.
  • You can remove the .deb file we downloaded to save space.

27 Comments on "How to watch Netflix on the Raspberry Pi"

  1. Netflix is supposed to be the easy option.

    BitTorrent is less complicated than this.

  2. Hi there,

    Sorry if my questions are stupid but I am quite new with the RPi.

    I followed all the steps and when the script finishes to download the Chrome OS file and starts to unzip it, I get this message:

    I can’t seem to find a valid USB drive. We need one with at least 1464 MB capacity.

    0 – quit

    Tell me what to do (or just press Enter to scan again).

    I am running the RPi3 with NOOBS, Raspbian.

  3. Two things…

    Option 14 downloaded chromeos_9000.91.0_daisy-skate_recovery_stable-channel_skate-mp-v2.bin… Seems the kpartx still did stuff, however, the mount command just gives me a list of valid commands suggesting a syntax error? I can’t figure it out. I have the right file path and name for /tmp/chrome…

  4. Hi,

    Thx for the tutorial. But it doesn’t work at my RPi3 with Raspbian. With the recovery script I got an other version of the bin -> chromeos_9000.91.0_daisy-skate_recovery_stable-channel_skate-mp-v2.bin. I have copied the libwidevine*.so files to /usr/lib/chrome… But it doesn’t work. Widevine is not listed in chrome://plugins or chrome://components. Do you have any ideas?

  5. After successfully following all the steps indicated, give me the following Netflix error: M7121-1331-P7. Any suggestion?

  6. I got the sames problems that previous people:
    – after downloading file : “I can’t seem to find a valid USB drive. We need one with at least 1464 MB capacity.”
    – with kpartx command : failed to stat() –av

    So I found binaries here: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1371274/+attachment/4397708/+files/WidevineLinuxForChromium44.tar.gz

    You can extract it with this command line : tar xzf filename.tar.gz then copy 2 files to /usr/lib/chromium-browser/.

    I tried to create the new user-agent string and I finally got this error code: C7702-1003. 🙁

  7. Did anyone solve the USB drive issue? Also got a dual-boot Raspbian/LibreELEC on 32 GB…

  8. I solved the USB drive issue with the simple modicum of… inserting a USB drive. Next problem is that it’s still not showing in chrome://plugins.

  9. I solved the USB issue by just pressing 0 for quit. If you use the file browser you will see that the file is there in the /tmp directory unless you do not have enough space on the SD card and you should get an error prior to that.

  10. Don´t work on Raspberry Pi Zero W?!

  11. You must select 15, not 14 to get the indicated build.

  12. I am not sure of what happened, but I followed the procedure and this is what I understood:

    About the “USB drive issue”:

    The tool “linux_recovery.sh” is a recovery tool, and it wants to put the image of a Chromium system on a USB key (so you can use it for recovery). We do not want this, we just want the bin file. At this point of the procedure, the bin file has been uncompressed and is in the /tmp directory. So just type ‘0’ which is telling him to quit.

    About “failed to stat()”:

    Until you do this, and as long as the installer is running, the bin file is loked. This explain the error ‘failed to stat()’, because the kpartx cannot access it properly.

    You can do:

    kpartx -l chromeos_9000.82.0_daisy-skate_recovery_stable-channel_skate-mp-v2.bin

    It will give you the list of partitions in the image.

    Then the rest of the procedure rolled forward without error.

    I agree with Brad, it seems the build to download is 15 and not 14. Then I got: chromeos_9334.72.0_daisy-skate_recovery_stable-channel_skate-mp-v2.bin (chromeos_9334.72.0 instead of chromeos_9000.91.0).

    At the end, the plugins are not listed in “chrome://plugins/” and Netflix still does not play.

    • Ville Salminen | June 26, 2017 at 1:15 pm | Reply

      Thanks for sorting out some of the mentioned problems.

      The recovery script has been updated, and that is why the filename is not the same anymore.

  13. If you would like to download chromeos_9000.82.0_daisy-skate_recovery_stable-channel_skate-mp-v2.bin then you can just execute:

    wget https://dl.google.com/dl/edgedl/chromeos/recovery/chromeos_9000.82.0_daisy-skate_recovery_stable-channel_skate-mp-v2.bin.zip

    All issues with wrong parameters are because of the ‘-‘ before the parameters. If you copy and paste the command from here ‘-‘ is replaced with other symbol that looks the same. Just delete it and write it manually.

    For me it still not working but this could be related to the Chromium version. At the moment it’s 56.0.2924.84.

    Ville, could you confirm it was working for you and if it still working for you will it be possible to tell us what is your Chromium version and upload the extracted .so files somewhere,

  14. Following these instructions, I get

    After following the instructions I’m getting the following error
    (Reading database … 118128 files and directories currently installed.)
    Preparing to unpack chromium-browser_56.0.2924.84-0ubuntu0.14.04.1.1011.deb …
    Unpacking chromium-browser (56.0.2924.84-0ubuntu0.14.04.1.1011) over (56.0.2924.84-0ubuntu0.14.04.1.1000) …
    dpkg-deb (subprocess): cannot copy archive member from ‘chromium-browser_56.0.2924.84-0ubuntu0.14.04.1.1011.deb’ to decompressor pipe: unexpected end of file or stream
    dpkg-deb (subprocess): decompressing archive member: lzma error: unexpected end of input
    dpkg-deb: error: subprocess returned error exit status 2
    dpkg: error processing archive chromium-browser_56.0.2924.84-0ubuntu0.14.04.1.1011.deb (–install):
    cannot copy extracted data for ‘./usr/lib/chromium-browser/chromium-browser’ to ‘/usr/lib/chromium-browser/chromium-browser.dpkg-new’: unexpected end of file or stream
    dpkg: error processing archive rasberry (–install):
    cannot access archive: No such file or directory
    dpkg: error processing archive pi (–install):
    cannot access archive: No such file or directory
    Processing triggers for hicolor-icon-theme (0.13-1) …
    Processing triggers for man-db (2.7.0.2-5) …
    Processing triggers for gnome-menus (3.13.3-6) …
    Processing triggers for desktop-file-utils (0.22-1) …
    Processing triggers for mime-support (3.58) …
    Errors were encountered while processing:
    chromium-browser_56.0.2924.84-0ubuntu0.14.04.1.1011.deb
    rasberry
    pi

    Any idea how to fix this?

    • Ville Salminen | July 2, 2017 at 3:47 pm | Reply

      It seems that your downloaded package is incomplete or corrupted. Please redownload the package.

  15. Does everyone else find the video quality and framerate poor?

    I’m having trouble justifying the effort I’ve put into getting my Raspberry Pi running like a “media center” when I could have just plugged my laptop into my TV with a mini display port adaptor and enjoyed a better quality experience with a lot less hassle.

  16. Ger BruggemanGman64 | July 11, 2017 at 12:03 pm | Reply

    I wonder if the Raspberry Pi is playing Netflix in full HD? Most media players only play Netflix in SD, which is rather useless in my opinion…

  17. Nice job. The video quality is bad, unfortunately. I am using the same hardware that was previously running LibreELEC without any issues regarding playback of full HD video from network drive or streaming from the internet. It must be (lack of) hardware drivers for processing the stream I guess? Hope someone can fix this. Much appreciated!

Leave a comment

Your email address will not be published.


*