RPi streaming station with Amazon Instant Video and Netflix

With Kodi 18 and inputstream, we can finally use DRM protected streams like used by Amazon and Netflix!

Get Kodi 18

First install OSMC on your rpi2 or rpi3 (those addons will not work on rpi1 or zero). You will need to purchase license keys for high-quality video streams and add them to your /boot/config.txt.

Log in via ssh and update your system

~$ sudo apt-get update && sudo apt-get dist-upgrade

Most likely you are on Kodi version 17 (how to check?). We need Kodi 18 to work properly with Netflix and Amazon Instant Video, since from this version DRM and input stream are properly supported.

If you are still on version 17, add this line to /etc/apt/sources.list to install the Kodi 18 test builds for OSMC.

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

Make sure you backup your system before proceeding. Check here for the necessary steps to upgrade. Reboot after the process has finished. You should be now on Kodi 18. Download now the repository zip-files for the Netflix Addon by asciidisco and the Instant Video Addon by Sandmann79.

~$ wget https://github.com/Sandmann79/xbmc/releases/download/v1.0.2/repository.sandmann79.plugins-1.0.2.zip
~$ wget 

and go to Settings -> Addons -> Install from zip file. After that you can install the two video addons from their respective repositories.

Amazon Instant Video

Setup the Amazon-Addon by choosing “Playback with” as “Input Stream” and adding your login data in “Connection”.  Within the Inputstream Settings set the streaming quality to “1080p” instead of “Max”. The Addon may be unresponsible at first, since there will be a database created that takes a lot of computing power. If it crashes, try again after rebooting.


For Netflix to work, we have to add some crypto-package (pycryptodomex) that should usually be installable with python-pip. However this did not work for me, so I fumbled a bit, to add the dependency differently. But maybe they fixed this issue now. Just open the kodi log in you SSH session

~$ tail -f /home/osmc/.kodi/temp/kodi.log

and run the addon (you will have to add an account first). If everything is fine, enjoy. If on the other hand a python error is logged that tells you something about a not found Cryptodome, proceed as follows. First, we install the general crypto-package:

~$ sudo apt-get install python-crypto

Somehow the Padding.py file is requested by the Netflix-Addon, but is not installed by python-crypto, so we add it manually:

~$ wget https://pypi.python.org/packages/d6/99/56ac930e35394c93440f1a6e254cf4573098503ff4c1851e820600a46a85/pycryptodomex-3.4.7.tar.gz
~$ tar -xvf pycryptodomex-3.4.7.tar.gz
~$ sudo cp pycryptodomex-3.4.7/lib/Crypto/Util/Padding.py /usr/lib/python2.7/dist-packages/Crypto/Util/

At the end, we create a symbolic link “Cryptodome” because the files are expected to be there:
~$ sudo ln -s /usr/lib/python2.7/dist-packages/Crypto /usr/lib/python2.7/dist-packages/Cryptodome

You should now got rid of errors and your Netflix addon yould be able to set your account data and watch the content.



Peter Pan. Kann fliegen mit Feenstaub.

Tagged with: , , ,
Posted in Raspberry Pi
18 comments on “RPi streaming station with Amazon Instant Video and Netflix
  1. […] ja früher schon über meine Liebe zum Music Player Daemon, mein Command-Keypad und jüngst über Netflix & Amazon Instant Video Addons berichtet. Ein weiterer Baustein ist die Funktionalität als HDTV Streaming Plattform.  Mein […]

  2. laclaro says:

    I just noticed, that the two repositories are also included in the kodinerds repository, so you can also add that one from zip (e.g. 1.1.9) as a starting point.

  3. Anonymous says:

    I always have a netflix error.

    maybe you know how to solve this.,

    see log

    from resources.lib.KodiHelper import KodiHelper
    File “/home/osmc/.kodi/addons/plugin.video.netflix/resources/lib/KodiHelper.py”, line 13, in
    from Cryptodome import Random
    File “/usr/lib/python2.7/dist-packages/Cryptodome/Random/__init__.py”, line 28, in
    from Crypto.Random import OSRNG
    ImportError: cannot import name OSRNG
    –>End of Python script error report<–
    18:21:37.461 T:1957359616 ERROR: GetDirectory – Error getting plugin://plugin.video.netflix/
    18:21:37.464 T:1957359616 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.netflix/) failed
    18:23:08.691 T:1957359616 NOTICE: Samba is idle. Closing the remaining connections


    • Anonymous says:

      some more details in the log.
      this might help to analyze the problem:

      12:20:28.841 T:1122427888 DEBUG: CAddonSettings[plugin.video.netflix]: loading setting definitions
      12:20:28.841 T:1122427888 DEBUG: CAddonSettings[plugin.video.netflix]: trying to load setting definitions from old format…
      12:20:28.847 T:1122427888 DEBUG: CAddonSettings[plugin.video.netflix]: loading setting values
      12:20:28.925 T:1122427888 DEBUG: CAddonSettings[plugin.video.netflix]: loading setting definitions
      12:20:28.926 T:1122427888 DEBUG: CAddonSettings[plugin.video.netflix]: trying to load setting definitions from old format…
      12:20:28.934 T:1122427888 DEBUG: CAddonSettings[plugin.video.netflix]: loading setting values
      12:20:28.978 T:1122427888 ERROR: EXCEPTION Thrown (PythonToCppException) : –>Python callback/script returned the following error<–
      Error Type:
      Error Contents:
      File “/home/osmc/.kodi/addons/plugin.video.netflix/addon.py”, line 42, in
      File “/home/osmc/.kodi/addons/plugin.video.netflix/resources/lib/utils.py”, line 45, in wrapped
      File “/home/osmc/.kodi/addons/plugin.video.netflix/resources/lib/Navigation.py”, line 85, in router
      File “/home/osmc/.kodi/addons/plugin.video.netflix/resources/lib/utils.py”, line 45, in wrapped
      File “/home/osmc/.kodi/addons/plugin.video.netflix/resources/lib/Navigation.py”, line 708, in before_routing_action
      File “/home/osmc/.kodi/addons/plugin.video.netflix/resources/lib/Navigation.py”, line 883, in call_netflix_service
      raise URLError(err)
      –>End of Python script error report<–
      12:20:29.067 T:1957122048 ERROR: GetDirectory – Error getting plugin://plugin.video.netflix/
      12:20:29.073 T:1957122048 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.netflix/) failed

      thanks T

  4. laclaro says:

    Seems that you are missing a component in the Python Crypto package (OSRNG). Were you able to resolve the issue? Which system are you running on? Upgrading system and netflix Addon might also help.
    Did you check https://github.com/asciidisco/plugin.video.netflix/issues?

    Best regards


  5. Hi, justed tried this. I’m using a Kodi 18 Build of libreelec and the playback stutters, but I didnt buy the license keys yet. Will the playback be improved if i buy the keys?

    • laclaro says:

      Yes it will, since the stuttering video content can most likely accellerated by GPU.

      • lutzhell says:

        No, at least on the PI 2 it will not, don’t buy! It looks like there simply is no way to watch fluent Netflix videos on it

  6. Robert Spierenburg says:

    I have it all installed and it seems to almost work, except when I play a movie it just plays a garbage green screen with some audio behind it.

    • Robert Spierenburg says:

      So it seems it has something to do with omxplayer. If I disable it in Player Settings then I can see video but it stutters like crazy as it is using SW decoding. Anyone else have this issue?

      • wessi2912 says:

        You need to purchase the license keys like mentioned in the tutorial…

      • Robert Spierenburg says:

        I had already purchased both of the keys. All other videos play without any issues, just not Netflix. Do you know if perhaps the addon is only valid in some countries? I’m in Canada.

  7. Roboro says:

    After reading around a lot, I discovered that because of the nature of the netflix and amazon streams, we can’t use hardware decoding to handle these. So omxplayer is out. I had the same problem with stuttering on my RPi 2 when I disabled omxplayer. I overclocked though and it seems to work okay most of the time. Last night I watched a movie on Netflix and it sort of hung twice. I think the Pi may be overheating since all of the load is on CPU now and the overclocking is probably keeping things warmer than they should be. I may upgrade to a Pi3 or look for alternative hardware, but this is definitely working fine for me with both Netflix and Amazon. You *have* to disable omxplayer though.

    • Robert Spierenburg says:

      That’s what I was afraid off. I’m just curious as to why people keep mentioning that you need to buy the license keys then.

  8. superloony says:

    Hi, and thanks for yiur instructions. Took me a while to get through (newbie…) but I managed successfully to get to the Kodi 18 testbuild. I got stuck, though, trying to install the sandmann79 plugin (its the prime video i need). Even though I typed the wget command into the command line as described, logged on with correct username and pw, I got the reply ERROR 404 Not Found. Strange, as his github profile still shows the file as precisely the adress you gave: https://github.com/Sandmann79/xbmc/releases/download/v1.0.2/repository.sandmann79.plugins-1.0.2.zip. Anybody any idea?

  9. lutzhell says:

    As can be seen in previous posts it seems to be impossible to watch Netflix Videos without stutter. At least it is not possible on my PI 2. If anyone has a suggestion what else i can do could you please provide? Thanks.
    When you own a PI 2 i think you can save the money for the licenses because you can’t use them anyway

  10. lutzhell says:

    Setting the Max. Resolutions to 480p in the InputStream-Addon settings finally did the trick for me now everything is running. Since i only have a small TV the low resolution is not a problem for me…
    (Note: using libreelec…)

  11. asddssd says:

    I did everything in the guide and bought the keys but now when I try to load a netflix video I just get the buffering symbol twice and then nothing happens, I’m still in the menu where I clicked the episode. any idea whats wrong?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Posts by topic…
…by month
Have a look at…

%d bloggers like this: