Using PVR with Raspbmc

Exclusive offer: get 50% off this eBook here
Raspberry Pi Media Center

Raspberry Pi Media Center — Save 50%

Transform your Raspberry Pi into a full-blown media center within 24 hours with this book and ebook.

€18.99    €9.50
by Sam Nazarko | June 2013 | Open Source

Low-cost and high-performing, with a massively diverse range of uses and applications, the Raspberry Pi is set to revolutionize the way we think about computing and programming. Using it as a media center allows everyone to have a low-cost device that is always on and attached to their TV.

In this article by Sam Nazarko, the author of Raspberry Pi Media Center, we'll look at the following topics:

  • What PVR allows us to do

  • The different types of PVR setups that Raspbmc supports

  • How to set up Raspbmc to take advantage of PVR

(For more resources related to this topic, see here.)

What is PVR?

Personal Video Recording (PVR), with a TV tuner, allows you to record as well as watch Live TV. Recordings can be scheduled manually based on a time, or with the help of the TV guide, which can be downloaded from the TV provider (by satellite/aerial or cable), or from a content information provider, such as Radio Times via the Internet. Not only does PVR allow you to watch Live TV, but on capable backends (we'll look at what a backend is in a moment), it allows you to rewind and pause live TV.

A single tuner allows you to tune into one channel at once, while two tuners would allow you to tune into two. As such, it's important to note that the capabilities listed earlier are not mutually exclusive, that is, with enough tuners it is possible to record one channel while watching another. This may, depending on the software you use as a backend, be possible on one tuner, if the two channels are on the same multiplexer.

Raspbmc's role in PVR

Raspbmc can function as both a PVR backend and a frontend. For PVR support in XBMC, it is necessary to have both a backend and one or more frontends. Let's see what a backend and frontend is:

  • Backend: A backend is the part that tunes the channel, records your scheduled programs, and serves those channels and recorded television to the frontends. One backend can serve multiple frontends, if it is sufficiently powerful enough and there are enough tuners available.

  • Frontend: A frontend is the part that receives content from the backend and plays back live television and recorded programs to the user. In the case of Raspbmc, XBMC serves as the frontend and allows us to play back the content. Multiple frontends can connect to one or more backends. This means that we can have several installations of Raspbmc play broadcast content from even a single tuner.

As we've now learned, Raspbmc has a built-in PVR frontend in the form of XBMC. However, it also has a built-in backend. This backend is TVHeadend, and we'll look at getting that up and running shortly.

Standalone backend versus built-in backend

There are cases when it is more favorable to use an external, or standalone, backend rather than the one that ships with Raspbmc itself. Outlined as follows is a comparison:

Standalone backend

Raspbmc backend (TVHeadend)

A better choice if you do not find TVHeadend feature-rich or prefer another backend.

If you only intend to have one frontend, it makes sense to run everything off the same device, rather than relying on an external system.

If you have a pre-existing backend, it is easier to configure Raspbmc to use that, rather than reconfiguring it completely.

The process may be simplified for you as, generally, one can just connect their device and it will be detected in TVHeadend.

If you are planning on having multiple frontends, it is more sensible to have a standalone backend. This is to ensure that the computer has enough horsepower, and also, you can serve from the same computer you are serving files from, and thus, only need one device on, rather than two (the streaming machine and the Pi).

Raspbmc's auto-update system covers the backend that is included as well. This means you will always have a reliable and stable version of TVHeadend bundled with Raspbmc and you need not worry about having to update it to get new features.

If you need to use a PCI or PCI expressbased tuner, you will need to use an external backend due to limitations of the Pi's connectivity.

Better for wireless media centers. If you have low bandwidth throughput, then running the tuner locally on the Raspberry Pi makes more sense as it does not rely on any transfers between the network (unless using HDHomeRun).

Setting up PVR

We will now look at how to set up a PVR. This will include configuring the backend as well as getting it running in XBMC.

An external backend

The purpose of this title is to focus on the Raspberry Pi, and as there is a great variety of PVR software available, it would be implausible to cover the many options. If you are planning on using an external backend, it is recommended that you thoroughly search for information on the Internet. There are even books for popular and comprehensive PVR packages, such as MythTV. TVHeadend was chosen for Raspbmc because it is lightweight and easy to manage.

Raspbmc's XBMC build will support the following backends at the time of writing:

  • MythTV

  • TVHeadend

  • ForTheRecord/Argus TV

  • MediaPortal

  • Njoy N7

  • NextPVR

  • VU+/Enigma

  • DVBViewer

  • VDR

Setting up TVHeadend in Raspbmc

It should be noted that not all TV tuners will work on your device. Due to the fact that the list changes frequently, it is not possible to list here the devices that work on the Raspberry Pi. However, the most popular tuners used with Raspbmc are AF90015 based. HDHomerun tuners by SilliconDust are supported as well (note that these tuners do not connect to your Pi directly, but are accessed through the network). With the right kernel modules, TVHeadend can support DVB-T (digital terrestrial), DVB-S (satellite), and DVB-C (cable) based tuners.

By default, the TVHeadend service is disabled in Raspbmc. We'll need to enable it as follows:

  1. Go to Raspbmc Settings—we did this before by selecting it from the Programs menu.

  2. Under the System Configuration tab, check the TVHeadend server radio button found under the Service Management category.

  3. Click on OK to save your settings.

  4. Now that the TVHeadend is running, we can now access its management page by going to

    You should substitute the preceding IP address,, with the actual IP address of the Raspberry Pi.

    You will be greeted with an interface much akin to the following screenshot:

  5. In the preceding screenshot we see that there are three main tabs available. They are as follows:

    • Electronic Program Guide: This shows us what is being broadcast on each channel. It is empty in the preceding screenshot because we've not scanned and added any channels.

    • Digital Video Recorder: This will allow you to schedule recordings of TV channels as well as use the Automatic recorder functionality, which can allow you to create powerful rules for automatic recording. You can also schedule recordings in XBMC; however, doing so via the web interface is probably more flexible.

    • Configuration: This is where you can configure the EPG source, choose where recordings are saved, manage access to the backend, and manage tuners.

  6. The Electronic Program Guide and Digital Video Recorder tabs are intuitive and simple so we will instead look at the Configuration section.

  7. Our first step in configuring a tuner is to head over to TV Adapters:

    As shown in the preceding screenshot, TV tuners should automatically be detected and selectable in the drop-down menu (highlighted here). On the right, a box entitled Adapter Configuration can be used for adjusting the tuner's parameters.

  8. Now, we need to select the Add DVB Network by location option. The following dialog box will appear:

    Once we have defined the region we are in, TVHeadend will automatically begin scanning for new services on the correct frequencies. These services can be mapped to channels by selecting the Map DVB services to channels button as shown earlier. We are now ready to connect to the backend in XBMC.

Connecting to our backend in XBMC

Regardless of whether we have used Raspbmc's built-in backend or an external one, the process for connecting to it in XBMC is very much the same.

We need to do the following:

  1. In XBMC, go to System | Settings | Add-ons | Disabled Add-ons | PVR clients. You will now see the following screenshot:

  2. Select the type of backend that you would like to connect to. You will then see a dialog allowing you to configure or enable the add-on.

  3. Select Configure and fill out the necessary connection details. Note that if you are connecting to the Raspbmc built-in backend, select the TVHeadend client to configure. The default settings will suffice:

  4. Click on OK to save these settings and select Enable. Note that the add-on is now located in System | Settings | Add-ons | Enabled add-ons | PVR clients rather than Disabled add-ons | PVR clients.

  5. Now, we need to go into Settings | System | Live TV. This allows you to configure a host of options related to Live TV. The most important one is the Enable Live TV option—be sure to check this box!

  6. Now, if we go back to the main menu, we'll see a Live TV option. Your channel information will be there already, although, like the instance shown as follows, it may need a bit of renaming:

    The following screenshot shows us a sample electronic program guide:

Simply select a channel and press Play! The functionality that PVR offers is controlled in a similar manner to XBMC, so this won't be covered in this article. If you have got this far, you've done the hard part already.


We've now covered what PVR can do for us, the differences between a frontend and backend, and where a remote backend may be more suitable than the one Raspbmc has built in. We then covered how to connect to that backend in XBMC and play back content from it.

Resources for Article :

Further resources on this subject:

Raspberry Pi Media Center Transform your Raspberry Pi into a full-blown media center within 24 hours with this book and ebook.
Published: February 2013
eBook Price: €18.99
Book Price: €27.99
See more
Select your format and quantity:

About the Author :

Sam Nazarko

Sam Nazarko is an 18-year-old student, currently studying Computer Science at King's College London, UK. He has been using computers since the age of four and has developed a huge passion for them. He has a wide range of experience and knowledge about both Windows and Linux platforms at desktop and server level. He enjoys developing tailor-made solutions for clients, which range from C# application development on Windows to C development on Linux, and has expertise in system deployment and administration on a large scale. He has recently been involved in open source development, harnessing his skills in embedded systems development by delivering Linux distributions for Apple TV and Raspberry Pi that deliver XBMC.

Sam is planning to launch a technology startup in 2013, which will focus on embedded system development and custom-made solutions.

Books From Packt

 Raspberry Pi Networking Cookbook
Raspberry Pi Networking Cookbook

 Raspberry Pi Home Automation with Arduino
Raspberry Pi Home Automation with Arduino

 MediaWiki 1.1 Beginner's Guide
MediaWiki 1.1 Beginner's Guide

 WordPress 3 For Business Bloggers
WordPress 3 For Business Bloggers

Avid Media Composer 6.x Cookbook
Avid Media Composer 6.x Cookbook

 Linux Shell Scripting Cookbook
Linux Shell Scripting Cookbook

 Instant Adobe Story Starter
Instant Adobe Story Starter

 Torque 3D Game Development Cookbook
Torque 3D Game Development Cookbook

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software