21 Aug 2020 - The wiki is undergoing a major cleanup. If you arrived here from a search engine and cannot find the page, please use the wiki search instead (top right corner of page)
More info can be found on the forum


From Official Kodi Wiki
Revision as of 16:19, 13 November 2014 by Gamester17 (talk | contribs)
Jump to: navigation, search
Live TV and PVR Setup Guide:
  1. Introduction
  2. Setting up the recording software
  3. Configuring live TV settings in Kodi
  4. The basics of Live TV and recording
  5. Live TV Artwork
Home icon grey.png   ▶ PVR ▶ Recording software ▶ Tvheadend

Tvheadend is a open source TV streaming PVR backend (server) software application for Linux supporting DVB-S(2), DVB-C(2), DVB-T(2), ATSC, IPTV (UDP/HTTP), and Analog video (V4L) as input sources, and it can be used as a PVR backend of Kodi. Version 3.4 and layer of Tvheadend also include support for timeshifting (pausing of Live TV).

By levering existing third-party PVR backend applications such as Tvheadend that specialize in receiving television signals and support a client–server model which Kodi can access via a PVR client addon, these PVR features allows you to watch Live TV, listen to radio, view a EPG TV-Guide, schedule recordings and enables many other TV related features, all using Kodi as your primary interface once the initial pairing connection to Tvheadend have been done and and configuration of the PVR client addon for it is complete.

1 Preinstalled options

The following XBMC/OS distributions come with Tvheadend already installed, or easily installed as an option. These are great one-stop solutions that can greatly simplify the installation of the backend, as well as various other benefits unique to those distros.

  • OpenELEC - In addition to coming with Tvheadend software and a Tvheadend XBMC PVR add-on, OpenELEC has both current XBMC v12 builds (with native PVR support) as well as special XBMC v11 PVR builds.

2 Installing Tvheadend

Most Debian and Ubuntu installations can take advantage of the standard APT installation methods for getting Tvheadend installed, either using a GUI package manager, or from the command line using "apt-get install tvheadend". The install procedure normally creates a user named "hts", which is the user Tvheadend will run as. You should check that the "hts" user has sufficient permissions to your tuner (usually /dev/dvb/adapter0/frontend0). Running the command "sudo adduser hts video" should be sufficient.
For more info, see: https://tvheadend.org/projects/tvheadend/wiki/Download
Raspberry Pi
The easiest way to get Tvheadend on the Raspberry Pi is to use OpenELEC or Raspbmc. You can also use the Arch Linux ARM instructions below if you are using Arch Linux ARM on the R-Pi.
Arch Linux
See: HOW-TO:Install Tvheadend on Arch Linux

(including PogoPlug)

Synology NAS
You can install Tvheadend from the Syno Community repo through the DiskStation Manager: http://www.synocommunity.com/repository

3 Tvheadend quick start guide

Note: This is just the most basic steps needed to get a signal from your PVR backend to XBMC. This guide probably doesn't include everything you will want to do, like name channels, get the electronic programming guide (EPG/TV guide) set up, remove channels, etc.
For help with those features see #Additional guides and links.
1. Make sure Tvheadend is up and running (see here for details: https://tvheadend.org/projects/tvheadend/wiki/Install_and_initial_setup )
2. All configuration is done in a web browser. If you are on the same machine that Tvheadend is installed then point your browser to http://localhost:9981 . If you are on a different machine than Tvheadend, then point your browser to http://IP.ADDRESS.GOES.HERE:9981 , where IP.ADDRESS.GOES.HERE = the IP address of the machine that Tvheadend is installed on. For example:
  1. Click on the Configuration tab
  2. Click on the TV Adapters tab
  3. Click on the arrow for the drop-down menu
  4. Select your TV tuner adapter

If your tuner hardware is not detected or is having issues, check http://linuxtv.org for driver support.

You will see a window like this. Now you will want to click on "Add DVB Network by location".
  1. From the menus select your location and the type of signal you are trying to receive. In this example we're using a generic list for QAM, a US signal for cable TV.
  2. Then click "Add DVB Network" at the bottom.
Wait for the number under "Muxes awaiting initial scan" to reach zero. If the number under "Services" is also zero, then that means Tvheadend has not picked up any channels. You may need to check your hardware or if you've selected the right signal type (step 5), or even your tuner driver (see http://linuxtv.org for driver support).

It might be possible that the firmware can't be found. Check dmesg for messages like the following:

[ 3931.964710] xc5000: waiting for firmware upload (dvb-fe-xc5000c-
[ 3931.970217] xc5000: Upload failed. (file not found?)

In this case, the Hauppauge WinTV-HVR-950Q tuner can't locate the firmware. You should download the desired firmware (the 950Q firmware can be found at http://www.kernellabs.com/firmware/xc5000/) and place in the correct directory (for Ubuntu this is /lib/firmware/). You should then see this message in dmesg:

[ 4791.147048] xc5000: firmware read 16497 bytes.
[ 4791.147049] xc5000: firmware uploading...
[ 4794.976020] xc5000: firmware upload complete...
Click on "Map DVB services to channels". You should now be able to pick up TV channels in XBMC once you configure the Tvheadend add-on configuration in the next section, "#Connecting XBMC to Tvheadend".

4 Connecting XBMC to Tvheadend

  1. Go to Settings -> Add-ons -> Enabled add-ons -> PVR Clients and select the Tvheadend add-on
  2. Select "Configure"
  3. By default, you should only need to fill in Tvheadend hostname or IP address.

Tvheadend HTSP Client.settings.png
Tvheadend hostname or IP address
The hostname or IP address of the server where Tvheadend is installed. If on the same machine then 'localhost' can be used.
HTTP port
The default for Tvheadend is 9981 but this will need updating if you have changed it in the Tvheadend settings.
HTSP port
The default for Tvheadend is 9982 but this will need updating if you have changed it in the Tvheadend settings.
If you have configured Tvheadend to require a username then enter it here. This can be blank.
If you have configured Tvheadend to require a password then enter it here. This can be blank.
Connect timeout in seconds
The default is 10 seconds however this can be lowered if you want XBMC to timeout connections to the Tvheadend backend quicker.
Response timeout in seconds
The default is 5 seconds however this can be lowered if you want XBMC to timeout requests to the Tvheadend backend quicker.

Next step: Configuring XBMC

5 Additional guides and links