Difference between revisions of "Raspberry Pi"

From MythTV Official Wiki
Jump to: navigation, search
(Add GPU Memory section)
m (Add line indicating support for both XCB and EGLFS in unofficial tarballs.)
Line 173: Line 173:
 
* ''Tarballs'' by Lawrence Rust<br>
 
* ''Tarballs'' by Lawrence Rust<br>
 
   Built upon Raspbian Wheezy and Jessie for MythTV 0.27 and 0.28 using
 
   Built upon Raspbian Wheezy and Jessie for MythTV 0.27 and 0.28 using
   QT 5.4.0.<br>
+
   QT 5.4.0.  Supports both XCB and EGLFS.<br>
 
   See [http://www.softsystem.co.uk/download/mythtv/mythtv_for_rpi.txt mythtv_for_rpi.txt].
 
   See [http://www.softsystem.co.uk/download/mythtv/mythtv_for_rpi.txt mythtv_for_rpi.txt].
 
* ''Tarball'' by Curtis Gedak<br>
 
* ''Tarball'' by Curtis Gedak<br>
   Built upon Raspbian Jessie for MythTV 0.27 using QT 5.4.0.<br>
+
   Built upon Raspbian Jessie for MythTV 0.27 using QT 5.4.0.  Supports
 +
  both XCB (OpenMAX Normal) and EGLFS (OpenMax EGLFS).<br>
 
   See [http://gedakc.users.sourceforge.net/display-doc.php?name=pvr-rpi-mythtv-frontend Mythfrontend Setup Tutorial (with MCE Remote Control)].
 
   See [http://gedakc.users.sourceforge.net/display-doc.php?name=pvr-rpi-mythtv-frontend Mythfrontend Setup Tutorial (with MCE Remote Control)].
 
* ''MicroSD Image'' by Piotr Oniszczuk<br>
 
* ''MicroSD Image'' by Piotr Oniszczuk<br>

Revision as of 15:13, 5 July 2016

Software-update-available.png This page is up-to-date as of MythTV version 0.28, the current release is 34.0

Overview

The Raspberry Pi is cheap and can be a decent frontend for a MythTV backend. The Raspberry Pi is a credit-card sized computer that costs around $30 barebones. Once you add a case, power supply and SD card it will run about $55. It supports HDMI output for audio and video, as well as composite video and analog stereo. When using HDMI it also supports CEC so that you can use the TV remote control to control MythTV. This is very converient for places where you cannot have a full size computer, such as kitchen. With its case, the Raspberry Pi is about the same size as the DTA devices from cable companies.

As of version 0.28, MythTV frontend is supported on Raspberry Pi 2 and above. There is also an unofficial release of 0.27 that works on Raspberry Pi 2.

Kodi has a plugin that supports mythtv frontend features. Kodi is a multimedia package that has very good support for Raspberry Pi.

MythTV frontend

Operating System

The Raspberry Pi supports several linux variants.

Raspbian

This is the original operating system for Raspberry Pi and supports all features of MythTV frontend.

You can download a package from github.

Ubuntu

Several flavors of Ubuntu are available for Raspberry Pi.

  • Ubuntu Server
  • Xubuntu
  • Lubuntu
  • Ubuntu Mate

When using Ubuntu you can use the Mythbuntu PPA to download the latest package.

When running on Ubuntu some MythTV features do not work (these all work with Raspbian):

  • CEC does not work. You cannot use a TV remote to control MythTV.
  • OpenGL ES does not work. On-screen displays have to use softblend which can cause jerkiness in the video and audio.
  • There are reports that HDMI Audio does not work well.

Arch Linux

There is a version of Arch Linux for Raspberry Pi.

Setup on Raspbian

First you need to have a MythTV backend set up on your local network. The Raspberry Pi will function as a remote frontend. It is best to use a wired connection, rather than wifi, especially if you are plying High Definition content.

  1. Download and install a Raspbian Jessie full desktop image on a microSD card.
  2. Boot Raspberry Pi with microSD card.
  3. Configure gpu_mem=256 using sudo raspi-config
  4. Purchase and install an MPEG-2 License Key from the Raspberry Pi Store.
  5. Download a MythTV Light debian package that matches your Mythbackend version (e.g. 0.27 or 0.28).
  6. Install the debian package using, for example, sudo gdebi mythtv-light_0.27.6-67-g070378a-0_armhf_jessie.deb
  7. Start mythfrontend from the menu using Sound & Video -> MythTV Frontend, or from a terminal window with mythfrontend
  8. If you encounter video or audio issues you might need to experiment with different mythfrontend Setup values, and /boot/config.txt values.

If "MythTV frontend" does not appear in the menu, run the following commands:

rm ~/.cache/menus/*
lxpanelctl restart

Do not enable the experimental desktop GL driver. When this is activated, video playback does not work.

Video Playback Profile

Coming Soon: The "OpenMax High Quality" profile is best for most cases, but will not work on Ubuntu systems. If that is not available, is jerky or does not work, use "OpenMax Normal".

GPU Memory

When using "softblend" OSD renderer or "OpenMax Normal" profile, GPU memory must be at least 128 MB. When using another OSD renderer or "OpenMax High Quality" profile, GPU memory must be set as 256 MB.

Audio

Using raspi-config, configure Audio to force either 3.5 mm jack or HDMI audio depending on which you are using.

Set the Audio device to "ALSA:default". If this is not available in the list, you can type it in.

If there is a hiss from the speakers, add this line to the /boot/config.txt:

disable_audio_dither=1

To enable the MythTV volume control, set "Mixer Device" to "ALSA:default" and mixer controls to "PCM".

Subtitles

When displaying subtitles you may find that the video or audio becomes jerky. This is more likely with Raspberry Pi 2 than with Pi 3. Coming Soon: If that happens go to Setup->Video->Playback->Playback Profiles (3/8) -> Edit. Change Osd Renderer to "threaded". This will cause a slower response to keyboard events but will give smoother audio and video with subtitles.

When playing recordings from USA TV you may find that subtitles are not available. To see the subtitles, edit the /boot/config.txt file and comment or remove the MPEG2 license, reboot. This may result in Jerky video with Raspberry Pi 2, but works well with Raspberry Pi 3. When running without an MPEG2 license on raspberry Pi 2, set Osd renderer to softblend for least jerkiness.

On Screen Display

Coming Soon: Currently there is only one OSD renderer available (softblend). In up upcoming release there will be two additional options. Here are results of testing the various scenarios of on screen display renderers.

With MPEG2 license

With USA TV recordings you may not see any subtitles.

OSD Render When OSD is displayed Keyboard When Subtitle Displayed
Audio Video Audio Video
PI2 softblend Slight Jerk Jerky OK Smooth Jerky
PI2 opengl Smooth Smooth OK Smooth Jerky
PI2 threaded Smooth Smooth SLOW Smooth Smooth
PI3 softblend Smooth Smooth OK Smooth Smooth
PI3 opengl Smooth Smooth OK Smooth Slight Jerk
PI3 threaded Smooth Smooth SLOW Smooth Smooth
Without MPEG2 license

This may be used to support subtitles for USA TV, or just because you don't want to spend $2.50.

OSD Render When OSD is displayed Keyboard When Subtitle Displayed
Audio Video Audio Video
PI2 softblend Jerky Jerky OK Jerky Jerky
PI2 opengl Jerky(*) Jerky(*) OK Jerky Jerky
PI2 threaded Jerky(*) Jerky(*) SLOW Jerky Jerky
PI3 softblend Smooth Smooth OK Smooth Smooth
PI3 opengl Smooth Smooth OK Smooth Smooth
PI3 threaded Smooth Smooth SLOW Smooth Smooth

(*) - Jerky even without OSD display

Remote Control

The Raspberry Pi supports CEC. If you connect to a CEC compatible Television set, you can use the TV remote control to control the Raspberry Pi. You will find that if the TV remote has play, stop, pause controls, that these can be used. Unfortunately many TVs which support CEC do not support the numeric keys.

To test and configure CEC, start up the MythTV frontend and navigate to Setup->Edit Keys. find any key and select a blank box at the bottom. Press enter. It will prompt you to type a key. Press keys on your remote until one shows a response. Press escape when asked whether to assign it. This way you can see which keys are available. Now you can navigate in the Edit Keys and assign your remote keys. With Global Select, up, down. left, right you can control most of MythTV. Additional buttons can be set to Menu, Information, Play, etc.

Kodi

Kodi is a multimedia package that has a MythTV plugin. Kodi and the plugin are not part of MythTV. They are a separate installable package. There are packages available that install a customized copy of Linux with the Kodi program.

Compatible With

The Openelec MythTV frontend currently states that it is compatible up to MythTv 0.28 and as it needs the API, then 0.27 is the minimum (Gerdesj (talk) 21:55, 30 August 2015 (UTC))

Detailed Specifications

The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. The SoC is a Broadcom BCM2835. This contains an ARM1176JZFS, with floating point, running at 700Mhz, and a Videocore 4 GPU. The GPU is capable of BluRay quality playback, using H.264 at 40MBits/s. It has a fast 3D core accessed using the supplied OpenGL ES2.0 and OpenVG libraries.

How to make it work

A lot of work has been done to make XBMC/Kodi perform well on Raspberry Pi.

The steps you have to do are:

  • Install MythTV backend (0.27+) on a separate computer on your LAN.
    • Make sure you set a PIN for the API or set it to 0000
  • Install OpenElec version of XBMC to your Raspberry Pi.
    • Find (scroll down the list) and download the image file
    • Write the image to the SD card using say dd in Linux
    • On first boot Openelec will resize partitions
    • Run through the first run wizard to set host name etc
  • Connect your Raspberry Pi to your LAN and your TV.
  • Turn on the MythTV backend, Raspberry Pi and TV.
  • From within the XBMC/Kodi menu set up the PVR client to point to your MythTV backend.

Normal video playback runs smoothly. Menu navigation and TV program can be a bit laggy. One trick to increase Raspberry PI performance is to overclock the CPU/GPU. On the PI 2 this is unnecessary.

This is a good guide to enabling the PVR (MythTV) front end: kodi.wiki/view/MythTV_PVR#Connecting_Kodi_to_MythTV. Note that you must set a PIN on the backend or set it to 0000. If you don't use 0000 you will need to use the PIN to connect to the backend. The PIN is set in the General section of mythtv-setup.

Finding the plugin can be a bit challenging. On Openelec it is already installed but listed in the "disabled" plugins until you enable it.

More Information

You can purchase an MPEG2 hardware decoder license. Depending on your tuner this may help your recordings play. I have been able to play 1080p live TV from a DVBS2 connected backend on a PI 2 model B running current Openelec out of the box with no additional licenses or over clocking (Gerdesj (talk) 21:55, 30 August 2015 (UTC))

Other Links

  • Tarballs by Lawrence Rust
 Built upon Raspbian Wheezy and Jessie for MythTV 0.27 and 0.28 using
 QT 5.4.0.  Supports both XCB and EGLFS.
See mythtv_for_rpi.txt.
  • Tarball by Curtis Gedak
 Built upon Raspbian Jessie for MythTV 0.27 using QT 5.4.0.  Supports
 both XCB (OpenMAX Normal) and EGLFS (OpenMax EGLFS).
See Mythfrontend Setup Tutorial (with MCE Remote Control).
  • MicroSD Image by Piotr Oniszczuk
 Built upon ArchLinux for MythTV 0.28 using QT 5.5.1.
See Beta of MiniMyth2 RPI2 edition.

These builds work with High Definition (HD) 720p and 1080i content on a Raspberry Pi 2 Model B or better. There have been reports that earlier Raspberry Pi models might work with Standard Definition (SD) content and a lower gpu_mem setting.