Netflix on Raspberry Pi 3

I’ve tried this before. Let’s see if anything’s changed. Maybe I can make it work this time.

I’m going to use this walkthrough first.

Raspbian

I’ve always installed Raspbian through NOOBS. This time I’ll go down the other road and install Raspbian without NOOBS as per this page on raspberrypi.org. I used the recommended Etcher Mac app, nice!

Raspbian comes straight up. Just to satisfy my pickiness I’m first going to disable underscan to get rid of that kooky dark border on the monitor. Oh, and I have to join the WiFi network and do a few other settings.
Raspberry Pi Config:
* Set locale: Australia
* Set timezone: Australia, NSW
* Set keyboard: United States, English (US)
* Set WiFi country: Australia
* Set underscan: off
* Set a new administrator password

OK, so I followed the procedure to backdate Chromium to 56. I couldn’t get the User-Agent Switcher for Chrome extension to install. I restarted. Because I had signed into Chromium it had installed my usual extensions. They all crashed; Chromium couldn’t even open a web page. So through Preferences, Add-Remove Software I removed Chromium and all that depends on it. After a reboot I went back to installing Chromium 56.

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

With Chromium freshly installed I needed to ensure the extensions didn’t crash or even self-install. Right now I have Chromium 56 installed, running, logged in as me, with my extensions loaded and having not crashed, yet. But … if I try to do anything related to extensions it’s a bust; it literally does an “unexpected shutdown”. It seems now I should go back from the beginning and not get side-tracked by signing in to Chromium and having my personal extensions loaded and stuffing things.

Later…

Having reloaded from a new microSD image, set the locale etc. I’m up to downgrading Chromium to version 56.
1. Opened Chromium
2. Searched “netflix raspberry pi”, picked the link to thepi.io
3. Copy-pasted the command line stuff under Step 2 into text file.
4. Closed Chromium.
5. Ran copied commands in a terminal.
6. Chromium 56 runs. Need that funky extension so I’m jumping back to the instructions URL to get the link to the User-Agent Switcher. And it worked. I’m already ahead of where I was last time.
7. Configured the User-Agent Switcher as documented …

It works! I’m watching Netflix. The frame rate is terrible and, having nothing plugged in, there’s no audio. But at least streaming video works.

The very next day …

I wake the Pi from power save and Chromium has crashed. All extensions are reporting errors. I can’t open a URL, not even chrome://about. My first thought is that an update has taken place overnight, but Raspberry Pi is a low power platform, surely updates are manual? In that case, has Chromium updated itself? How can I know?

After a reboot I start Chromium again. Still broken. Looking at Add/Remove Software it appears Chromium 56 is what’s currently installed. So what’s gone wrong?
1. I remove Chromium and it’s add-ons.
2. From the terminal I again install Chromium 56 sudo dpkg -i chromium-browser_56.0.2924.84-0ubuntu0.14.04.1.1011.deb

Chromium comes straight up. The User-Agent Switcher is running and working. The Netflix profile is still the default. Going straight to Netflix, it works.

So, why did it break overnight? Will it break every night? I accidentally closed Chromium and tried to open it back up. It won’t start.
1. After a few attempts to start it I now have a set of chromium-browser processes running although there’s no UI. I used ps -ax " grep chro to find them.
2. Killed all processes, eg. kill -9 2481
3. Chromium opens but reports “Profile error occurred”

Testing the hypothesis that “closing the browser causes Chromium to ‘not shutdown correctly’:
1. Open Chromium
2. Go to netflix.com
3. Start playing a programme
4. Close Chromium while playing
5. Restart Chomium. .”Profile Error Occurred”.
6. Go to netflix.com
7. Start playing a programme
8. Plays correctly.

Testing the hypothesis that “shutting down while playing Netflix” causes the a problem:
1. Open Chromium
2. Go to netflix.com
3. Start playing a programme
4. Do a restart
5. Open Chromium
6. Go to netflix.com
7. “Whoops, something went wrong” Error: M7121-1331-P7
Closing and re-opening Chromium worked and Netflix played normally.

Video
Link

Performance

When I say Netflix “plays normally” I mean there’s some picture and some sound. Enough to know that no error has occurred and it’s “playing video”. But it’s god-awful. There’s constant jitter in the video and all kinds of audio interference between the picture and the audio track. I’m using the audio out from the Pi, because this is how I intend to connect it to my TV. This is unwatchable.

I found a link with 10 steps to Top ten tips: Make Netflix perform better in Raspberry Pi

Tip 1

Use Pi 2 as an option? You’ve gotta be kidding. Pi 3 can’t even keep up.

Tip 2

More GPU memory. I’m currently at 64MB. Bumping it to 256MB. Reboot required. No improvement. Next?

Tip 3

Yeah, I’m strangling it. The yellow lightning bolt is displayed and I need more power. I’ll get a bigger supply on it now. Changed to a 2.1A iPad USB power adaptor. Lightning bolt shows up at power up. Waited two days and drove 50km to get a “genuine Raspberry Pi 3 power adaptor”. The lightning bolt is gone off the screen and playback hasn’t changed. Well, that’s the top three tips done with zero effect.

Tip 4

A wired connection? Sure, I can try that. WiFi off. Ethernet cable in. Reboot. Zero improvement.

Tip 5

Using the Raspberry Pi Configuration I dropped the resolution from 1920 x 1080 down to CEA mode 3 720×480 60Hz 16:9 and the chop was reduced, but still awful. I then tried CEA mode 1 640×480 60Hz 4:3 and, actually, it’s watchable. Frames are still regularly dropped but the rate has reduced to the point it’s annoying but not causing me to look away. So now I have a device with 1080 lines of TV resolution running at 480 lines. Wow. I’m not impressed.

Tip 6

The only extension I have on Chromium is the required User-Agent Switcher. I can’t remove that.

Tip 7

Full-screen, yes. Frame dropping, yes.

Tip 8

So while Netflix doesn’t work you want me to try Hulu? WFT is Hulu? That’s not a tip.

Tip 9

Oh, so a VPN will get me to the Netflix USA catalog? Again, this doesn’t help performance.

Tip 10

Yes, I can build my own Chromium. Since I had no trouble getting and using someone else’s .deb file I can’t see that making a great difference.

Summary

So this particular performance guide is a bust. Nothing in there gets me to 1080p without a high rate of dropped frames. Grrr.

I think if some degree of performance tuning was going to fix the issues, I’ll have to dig into the processes running and see what fraction of CPU time they’re taking. Taking into account what I’ve learned and what I’ve read it seems that one of two things is happening:
* Netflix playback is competing with other processes for the CPU’s resources, or
* The GPU isn’t being pulled into the task at all and playback is CPU- or memory-constrained, or
* There simply aren’t the hardware resources to playback Netflix anyway.

Other Media

That last point (above) made me realise I should attempt playback of HD media that’s not sourced from Netflix. So after Chromium spat the dummy I reinstalled it, set the resolution back to 1080p, copied over a movie from my LAN storage and opened it. And I don’t have a media player. sudo apt-get install vlc!

Before I can see if The Italian Job will play in 1080p I now have a new overlaid icon on the Raspberry Pi’s display. A thermometer! I am cooking my Pi before it even renders a single frame.

Restart. Right-click the file, select VLC media player, wait. I get a frozen frame on the screen. The CPU’s cooking again (97%). That’s it. So it seems the Raspberry Pi 3 cannot do HD video of any kind.

The Last Word

So why all the hoo-haa about the Raspberry Pi having HDMI out and being able to do video? When you consider it’s a low-power platform you see that if it can do HD video then it has to do nothing else. The slightest competition for resources, or misconfiguration, will bring it to it’s knees. And so far all I’ve experienced while trying to play video on a Pi is the system being saturated in one respect or another.

I think the effort required to get HD video out of the Pi 3 makes a $50 Android media player device worth every cent.

That is all

One Reply to “Netflix on Raspberry Pi 3”

  1. Terrific write up. Very useful for others like me contemplating undergoing trying a similar setup.

    Thanks!

Comments are closed.