Stream Amazon Video in LibreELEC with InputStream

Lead Image © Christos Georghiou,, Sofia Vlasiuk and Hana Schwarzova,

Home Theater

The interface for Kodi 17 "Krypton" has undergone a complete overhaul. Significant changes now allow you to stream Amazon Video.

The practice of creating an entertainment center out of a low-cost Raspberry Pi (Rasp Pi) and Kodi, the free media center software package, has become widespread. The media center that emerges from this hardware/software combo can play media that is local or saved to network-attached storage (NAS). It also can easily stream videos from platforms like YouTube and Vimeo. Additionally, it accepts films streamed from a smartphone. The end result is that the Rasp Pi can turn any television into a smart TV.

Nonetheless, there is a small catch: This media center cannot connect with popular video on demand (VOD) services such as Netflix, Hulu, and Amazon Video. Previously, a suitable solution was available for Amazon Video. However, changes made by the service provider mean that the solution no longer necessarily works. The Kodi distribution LibreELEC [1] and Kodi's new InputStream interface have stepped into this void, thus making it possible once again to use Amazon Video with a Kodi Rasp Pi. Moreover, the new arrangement works even better than before.

Kodi 17 "Krypton" is still a work in progress, but extensive modifications have already made themselves apparent [2]. Most noticeably, the interface has been completely overhauled (Figure 1). However, the true magic happens under the hood. Kodi 17 works with a new video player (Figure 2) that has an InputStream extension [3] for handling dynamic adaptive streaming over HTTP (MPEG-DASH) [4]. This paves the way for extensions like the Amazon Prime Video add-on to hunt for video signals with a decoder. The decoder unravels streams from Amazon, Netflix, and other providers that have been encrypted with Widevine [5].

Figure 1: Kodi 17 "Krypton" has gotten a completely new skin with Estuary.
Figure 2: Kodi 17's new skin design has a clean appearance and is now easier to operate.

Linux makes it possible to use VOD services on Chrome without much effort because the web browser comes with the Widevine plugin already integrated. However, Chrome is not officially available for ARM-based systems like the Rasp Pi. This means that Kodi distributions like OpenELEC, OSMC [6], and others cannot decode video streams. This is where Google's Chromium OS [7] comes into play.

Chromebooks [8] come equipped with these operating systems, and they usually work with ARM processors. Google wants video portals like Netflix to work on their devices. To make a long story short, Kodi 17 makes it possible to play selections from Amazon Video on the Rasp Pi using the Widevine library from Chromium OS with the new video player and an InputStream plugin (see the "Amazon Video" box).

Amazon Video

Amazon used to just be a book dealer. Now, Amazon Video offers movies and TV shows for rent or purchase. You can either rent a title for 48 hours or purchase the title to own. Customers who subscribe to Amazon Prime ($99 a year) also get access to Amazon Prime Video, which offers free viewing of thousands of films and television series (many of which appear to be already somewhat dated).

LibreELEC forks OpenELEC

Conflicts arose some months back in the OpenELEC community. Things eventually got resolved, and a number of developers left to start a new project called LibreELEC [9]. The LibreELEC team has posted a summary of their goals on the project website. In the long run, they hope to create a foundation and to have a project board, which would be selected to guide the project. The team also hopes to establish a scheduled release cycle. Currently, LibreELEC is available in version 7.0. In essence, this is a fork of OpenELEC 6.0. The upcoming LibreELEC version is intended to surpass its predecessor and exhibit more distinctive features.

Why would you choose LibreELEC instead of OpenELEC at this point? The reason is that the well-known Kodi and OpenELEC developer Milhouse [10] has switched over to the LibreELEC team [11]. In the past, he regularly made test builds using Kodi together with an InputStream plugin so that the OpenELEC system was easy to use. His builds are still available, but now they are based on LibreELEC [12]. As a result, this distribution can be recommended to Amazon Video users for use on the Rasp Pi. Presently, users still won't notice much that is different when switching over, because current test builds are largely based on OpenELEC.

A Rasp Pi with LibreELEC

You can download LibreELEC [13] as an image file from the project's rudimentary website, which contains builds for Pi the Zero, RPi1, RPi2, and RPi3. LibreELEC v7.0.0 still contains Kodi 16 (Figure 3). However, you would need to first install this version to update the system later with the Milhouse test builds.

Figure 3: LibreELEC 7.0.0 is still largely based on OpenELEC 6.0, which developers continue to push forward.

During testing, the RPi2 and RPi3 demonstrated almost equal suitability as a platform for LibreELEC (see the "Hint" box). The streaming of Amazon content works both with the RPi2 and the faster RPi3. Therefore, it is not absolutely necessary for the user to purchase a new Rasp Pi.


To complete this project, you will need a Raspberry Pi 2 (RPi2) or an updated RPi3. The standard Kodi distributions, like OpenELEC, OSMC, and the new LibreELEC, are also available for first-generation Rasp Pis; however, Widevine does not run on the architecture of the ARMv6 processor in the first Rasp Pi, which means you need to use a current model.

Installing an image of LibreELEC on a memory card is almost like installing Raspbian and OpenELEC. The Linux user uses lsblk to list the device ID of the microSD memory card that is inserted in the card reader. The user decompresses the image and writes it with dd to the memory card (Listing 1). The device ID in the last line should be changed to correspond to your system device name. Windows users often rely on the Win32 Disk Imager [14]; Mac users can download PiWriter [15].

Listing 1

Linux Burn to SD

$ lsblk
sdd      8:48   1   7,4G  0 disk
|-sdd1   8:49   1    60M  0 part /run/media/max/boot
|-sdd2   8:50   1   3,7G  0 part /run/media/max/e6e7f776-11a4-4cd7-b4fd-c44ecdbfcf90
$ gunzip LibreELEC-RPi2.arm-7.0.0.img.gz
$ sudo dd if=LibreELEC-RPi2.arm-7.0.0.img of=</dev/sdd> bs=1M; sync

After the image has been written to the card, it is time to insert it into the Rasp Pi. The computer is then connected via HDMI to a television or monitor and the network, and the Rasp Pi and monitor will need a power source. When first started, the installation routine will expand the partitions to completely fill the memory card. When this routine finishes, the customary Kodi interface and the installation assistant will appear on the screen.

You then need to retrieve the most recently updated Milhouse package from the Kodi Forum [12]. These builds are suitable for the RPi2 and the RPi3. The first entry always lists the Recent builds, making it easy to find the correct package. I successfully tested versions 0503 (from May 3, 2016) and 0509 (from May 9, 2016). Between these two builds, I found a few that caused problems. The naming protocol for the files always follows pattern:

LibreELEC-RPi2.arm-8.0-Milhouse-<time stamp>-<Build number>-<hash total>.tar

To install the package, you should open the Internet release version smb://libreelec in an Internet-enabled file manager. In Windows, this would be \\libreelec. You then move the entire TAR file into the Update directory on the LibreELEC Rasp Pi (Figure 4). Another option is to remove the memory card, put it into a PC card reader, and from there move the file directly into the storage directory in the card's root directory. Afterward, you should restart the Rasp Pi to install the update. The procedure is identical for other updates to newer Milhouse builds (see the "Installing Updates" box).

Installing Updates

To keep the LibreELEC system updated, you should copy new builds, in the form of TAR packages, to the Update directory of the system and then restart the distribution. This should be done with the first installation. The update process does not change any add-ons or customized settings. If one of the daily updates proves to be problematic, you can install older update files in the same way. These will roll back the system to a previous state.

Figure 4: Move the Milhouse update package from the repository to the LibreELEC system.

Buy this article as PDF

Express-Checkout as PDF

Pages: 8

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • On the DVD

    NOOBS 1.9.2

  • On the DVD

    NOOBS (New Out Of the Box Software) provides an easy way to install operating systems on your Rasp Pi.

  • On the DVD

    The DVD enclosed with this issue comes with a collection of some of the best and most popular Raspberry Pi distributions.

  • Making a smart TV with XBMC and a Raspberry Pi

    For just a small amount of money, you can turn any television set into a multi-use, smart TV by adding a Raspberry Pi and XBMC. In this article, we will help you start out with the XBMC media center.

  • Discovering OSMC

    The free and open source OSMC media center gives the Kodi home theater software an updated look and some slick features.