Netflix Native Integration

From MythTV Official Wiki
Revision as of 09:13, 23 December 2014 by Chadparry (talk | contribs) (Customization)

Jump to: navigation, search

This describes how to integrate Netflix and Amazon Instant Video with a MythTV frontend. The system is made for maximum convenience, including these features:

  • Netflix runs in a native Chrome browser.
    • The HTML5 player with Encrypted Media Extensions is used.
    • Neither WINE nor pipelight are required for Netflix, (but pipelight is recommended for Amazon Instant Video).
    • Hardware acceleration is supported.
  • The remote can be used to load and start and stop movies and control the volume.
  • The remote can act as a mouse with acceleration.
  • The remote can enter letters using multi-tap on the number buttons.

These instructions are only for Linux.

Installation

Dependencies

The latest Chrome browser should be downloaded and installed by following the instructions at https://www.google.com/chrome/browser/. (The Chromium builds do not include all the required plugins, so use Chrome).

On a Debian-like system, the other dependencies can be installed with this command:

sudo apt-get install xdotool python-alsaaudio python-pylirc

These scripts were designed for the keys on a Windows-compatible remote control. You may have to adjust the LIRC configuration for other models. Full integration requires the BACK and ZOOM buttons and a number keypad.

MCERemoteControl.jpg

Firefox changes

For Amazon Instant Video to work smoothly, you then need a Firefox installation with Silverlight support.

  1. Follow all the instructions in this article:
        How to Watch Amazon Instant Video on Linux
    Make sure that videos play well before proceeding.
  2. Start the Firefox profile manager:
    firefox -P
  3. Create a new profile called Kiosk and make it the default.
  4. Start the browser using the new profile.
  5. Log in to your Amazon Instant Video Library. Ask the browser to remember your password.
  6. Install the R-kiosk add-on. This will remove the navigation bar and enable the browser's fullscreen mode all the time. This makes it easier to watch movies, but harder to customize, so make sure movies are working before installing the add-on.

MythTV changes

These instructions assume that you built and installed MythTV yourself. If you used a binary installation, you will need to reinstall MythTV to get these features.

The changes can all be retrieved from a GitHub branch.

git remote add chadparry https://github.com/chadparry/mythtv.git && git pull chadparry netflix

Then re-install like normal.

cd mythtv && make && sudo make install && cd ../mythplugins && make && sudo make install

Usage

Starting

  • Start by choosing "Netflix" or "Amazon Instant Video" from the "Internet Video" menu.
  • To exit, use the BACK remote control button. (It looks like a ⬅ on the Windows remote control).
  • To control the volume, use the VOLUMEUP and VOLUMEDOWN buttons.

Shortcut Keys

While a show is playing in Netflix, the following keys are available. When a show is not playing, pressing these buttons could cause nonsense characters to be entered. These buttons are not supported in Amazon Instant Video.

  • PLAY
  • PAUSE
  • REWIND
  • FORWARD
  • MUTE
  • ZOOM (toggles fullscreen mode)

Mouse Controls

The arrows can be used to control the mouse. Mouse acceleration is supported, meaning that the cursor will speed up as long as you hold the button down. This is ideal for both fine and large pointer adjustments.

Multi-Tap

The number buttons can be used to enter alphabetic characters. This is necessary for entering a name into a search box. Use the multi-tap system like on old mobile phones. For example, to enter the letter L, press 555. To enter an actual number 5, press 5555. To enter a space, press 0.

Customization

The menu options can be customized in your sources by modifying some XML files. If you use the default menus, then you should edit mythtv/themes/defaultmenu/library.xml. If you use the classic menus, then you should edit mythplugins/mythnetvision/theme/menus/netvisionmenu.xml. (If you aren't sure which one you use, then it doesn't hurt to edit both). You can add new menu options for different web pages. Just copy those lines and change the type and text and description to whatever you want. The action line should start with EXEC /usr/local/bin/lircfirefox.py /usr/bin/firefox and then include the URL for your desired page.

For example, the following snippet from the XML shows how to add a menu entry for Sesame Street Videos.

    <button>
        <type>SESAME_STREET</type>
        <text>Sesame Street</text>
        <description>Sesame Street Videos</description>
        <action>EXEC lircfirefox.py /usr/bin/firefox 'http://www.sesamestreet.org/videos'</action>
    </button>

After you make any changes, run sudo make install again. You should run the installation from the mythtv directory if you made changes under it, and from the mythplugins durectory if you made changes under it.