Install Netflix Amazon Prime Video and Plex on the Raspberry Pi in Kodi using OSMC

by | May 6, 2018 | Technology

The Raspberry Pi makes a great little media center, but one thing it has always lacked was Netflix support. Now thanks to the upcoming release of Kodi Leia, we can now make that a reality! This installation does use nightly builds of OSMC to get the latest version of Kodi, so keep in mind this code is in progress and there are the possibilities of issues. That being said, I have been using it now for a while and have found it to be quite reliable, the only glitch noticed was an OSMC crash on the initial startup. It automatically restarted and has been fine since. This is a known bug and will likely be rectified soon. Now with all that said, lets get started…

Lets install OSMC

Lets grab the latest release version of OSMC from here.

https://osmc.tv/download/

Once downloaded, write the image to your SD card. If your new to writing images, there is a great cross-platform program called Etcher you can use to write to the SD card. It can be found here.

https://etcher.io/

Once your have written to the SD card, lets insert and start our Raspberry Pi.

Configure OSMC

On first boot, OSMC will install, then ask you a number of setup questions.

Set your Default Language
Set your Time Zone
Set your Device Name
Make sure SSH is Enabled
Configure your Networking (Wired or Wireless)
Choose OSMC for your default look (Estuary may have playback issues with the Netflix add-on)

Once all the configuration is completed, you should be at the OSMC homescreen. Head down to Settings, then to System Info and note what the IP address is of your Raspberry Pi.

Lets update OSMC to a nightly build

Next we need to update OSMC to one of the nightly builds. To do this we need to SSH into our Raspberry Pi. If you need some help with this, there is a great program for windows called Putty, which can be downloaded here.

https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

Using your SSH client, and the IP address noted earlier now connect to your Raspberry Pi. The defaults are login is

Username: osmc
Password: osmc

This should log you into your Raspberry Pi.

Lets update our apt sources to include the nightly builds of OSMC.

sudo nano /etc/apt/sources.list

This will open our sources file. Scroll to the bottom, and add the following line.

deb http://download.osmc.tv/dev/gmc-18 gmc-18 main

Press CTRL+x, enter Y to confirm, and press enter again to save our changes.

Now lets add the gpg certificate for the new source.

wget -qO - http://download.osmc.tv/dev/gmc-18/gpg.key | sudo apt-key add -

Now, lets set OSMC to run on our specific build with the following commands. Enter each one at a time.

sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get install rbp2-mediacenter-osmc=17.8-290 -y --allow-downgrades

This will install OSMC to build 17.8-290 which is stable for this. Previously the guide used versions 17.8-243 & 17.8-225 which are no longer available.

Lets add some dependencies

In order to get our add-ons working correctly, we need to add some additional dependencies and their recommended packages.

sudo apt-get install python-pip python-crypto build-essential -y
sudo apt-get install python-all-dev python-setuptools python-wheel -y
sudo apt-get install python-crypto-dbg python-crypto-doc python-pip-whl -y

Now lets install our Python cryptography dependency.

pip install pycryptodomex

To make sure our add-ons are finding our pycryptodomex module, lets add a symbolic link to the location.

sudo ln -s /usr/lib/python2.7/dist-packages/Crypto /usr/lib/python2.7/dist-packages/Cryptodome

Lets get our add-ons

You can download these .zip repositories directly in Kodi, but its nice and simple to cut and paste these links into our SSH session. So lets download our Netflix and Amazon Prime Video Addons here.

wget https://github.com/kodinerds/repo/raw/master/repository.netflix/repository.netflix-1.0.1.zip
wget https://github.com/Sandmann79/xbmc/releases/download/v1.0.2/repository.sandmann79.plugins-1.0.2.zip

Once downloaded, lets go ahead and reboot our system.

sudo reboot

Lets Install our Add-ons

Now that we are all setup, lets configure OSMC. First, lets enable our newly downloaded Add-ons.

Plex

Settings -> Add-on browser -> Install from Repository -> Video add-ons
Move to the left until the sidebar opens, and select Check for updates.
Now scroll down to Plex and select. Then select Install. And Ok to confirm.

Amazon Prime Video

Settings -> Add-on browser -> Install from Zip File
Root filesystem -> home -> osmc -> repository.sandmann79.plugins…

This will install the repository. Now we install the add-on.

Settings -> Add-on browser -> Install from repository -> Sandmann79s Repository
Video add-ons -> Amazon VOD (Select Amazon if you live in Germany)
Now select install and okay.

Netflix

Settings -> Add-on browser -> Install from Zip File
Root filesystem -> home -> osmc -> repository.netflix-1.0.1.zip

This will install the repository, now lets install the add-on.

Settings -> Add-on browser -> Install from repository -> Netflix Addon Repository
Video add-ons -> Netflix
Select Install, Select newest version, and select okay. (script.module.pycryptodome will state unavailable, but we took care of that earlier.)

Lets configure our installed Add-ons

Amazon Prime Video configuration.

Settings -> Add-on browser -> My add-ons -> Video Add-ons -> Amazon VOD
Select Configure
Under General, change Playback with to Input Stream.
Under Connection, go to Sign In, and login to our Amazon Prime Account.

At time of writing this, there is an error on the Amazon VOD plugin relating to this version of OSMC. The fix is complete, but has not been pushed to the repo yet. If there is no error, continue to the Netflix configuration. If it gives you an error, follow these steps…

SSH back into your system, using your Raspberry Pi’s IP and the default username and password. Then enter the following commands.

sudo apt-get install git -y
cd ~
git clone https://github.com/Sandmann79/xbmc.git
sudo cp ~/xbmc/plugin.video.amazon-test ~/.kodi/addons/ -r
sudo rm -r ~/xbmc
sudo reboot

Once restarted, try to run Amazon Prime again.

Netflix Configuration

Settings -> Add-on browser -> My add-ons -> Video Add-ons -> Netflix
Select Configure
Under Account, select Switch Accounts and enter your login information.

InputStream Configuration

Settings -> Add-on browser -> My add-ons -> VideoPlayer InputStream -> InputStream Adaptive
Select Configure
Set your Max Resolution general and secure decoders to your desired resolution and Select Ok.

Running Netflix or Amazon Video for the first time

Netflix (and Amazon Video) require a proprietary decryption module called Widevine CMD. Luckily our add-ons will take care of this for us. Select a Netflix or Amazon show and start an episode. You will then be prompted to Install Widevine. Because it is propriety it will be downloaded from a Chrome OS recovery image. Select yes to continue, and accept the license and root permissions. Once downloaded you will be prompted once more to install.

Once the installation is complete, lets reboot once more. Head back to the home screen, to Power and select reboot.

The first time you launch the video, the quality may be poor, but after the first launch it should improve to your selected quality. You can launch both Prime and Netflix and back out. Next time in should be looking great!

All finished!

Congratulations, you should now have a working Media Center which you can use for your local content, as well as Netflix, Amazon Prime, and Plex. Just make sure when OSMC prompts you to upgrade OSMC to decline as newer alpha and beta versions may break it. On bootup everything likes to toss a single error once, then its perfect afterwards. I leave my Pi running and it been great.

If you found this guide helpful please leave me some encouragement below! If your really happy, you can always gift me a coffee, I can never say no to coffee!