[Obsolete] Instructions for Viewing Live TV

I have found getting Live Tv working on my Pi 2 to be a somewhat traumatic exercise, and judging by the different threads on the subject I am not alone. I have there tried to assemble notes of what I did in the hope that it will help others, and perhaps eventually form the basis of a wiki entry.

Feedback welcome.

####Rough Draft 1

##1. Introduction

This document outlines how I set it up OSMC/Kodi to allow me to watch live UK FreeviewTV, using a Windows PC for that process. I am publishing it in the hope that it may be of use to any other newbie like me struggling to get Live TV working, and in the hope in can be adapted to be in a form suitable for inclusion in the wiki.

Though the information is based on the UK Freeview, I suspect much is relevant to other networks.

Regrettably in some cases I have not found a method of avoiding performing operations at the Linux command line, in which case I have indicated the necessary commands in a blue font thus. Hopefully future updates to OSMC will make these redundant.

I have only tried these procedures on a Pi 2, but believe they are also applicable on a Pi 1, though in the latter case times to perform various action may be significantly extended.

Where I have come across alternatives I have included them with comments as to the relative merits of each, though some may solely reflect my personal preferences.

I would welcome feedback, particularly on:

  • Any errors, or significant omissions in the context of a newbie attempting to get OSMC working with live TV.

  • Any changes needed for other Pi models

  • From OSMC developers on any features or anomalies noted below that they intend to change.

and information on other tuners/networks.

2. Other sources of Information & HELP

If you have difficulties, the following sources of information may help:

but note that the last is based on using the Confluence skin rather than the default OSMC skin and it may be difficult to relate your screen to the wiki without changing to the Confluence skin as detailed below.

3. Change Skin (To allow use of mouse)

For setting up purposes, I find a mouse much more convenient than keyboard, but the OSMC skin is not compatible with use of the mouse (it does respond, but far too quickly) so changed to the Confluence skin using the instructions here. If you are happy with using the keyboard, or do not have a mouse connected to your PC, skip this section and use keyboard arrow keys + Enter/OK instead of clicking in the instructions below.

4. Installing Firmware for Your Tuner

4.1. General

I have two tuners, requiring different firmware files downloaded from the internet, and some limited Linux experience. I chose to use SSH {user = osmc, password= osmc}, and run the relevant commands from my PC using “PuTTY” - this can be done while waiting for App Store installations to be completed. Using PuTTY on the machine being used to read this will allow you to paste commends directly from this document - select the relevant text here, ^C, click on PuTTY to move the focus, right click to insert the text at the cursor position. Otherwise you will need to return to the Linux prompt as detailed here.

4.2. Hauppage WinTV-HVR-900H

The relevant commands I used were:

cd /lib/firmware
sudo wget goo.gl/xZSPH -O dvb\_firmware.tar.gz
sudo tar -xzf dvb\_firmware.tar.gz

cd /lib/firmware

sudo wget https://github.com/OpenELEC/dvb-firmware/tree/master/firmware

While the scanning process does not seem to work, I can view TV if I first scan with the other tuner.

4.3. PCTV tripleStick 292e

The following commends seem to lead to satisfactory operation:

sudo wget http://palosaari.fi/linux/v4l-dvb/firmware/Si2168/dvb-demod-si2168-02.fw -O /lib/firmware/dvb-demod-si2168-02.fw

sudo wget http://palosaari.fi/linux/v4l-dvb/firmware/Si2168/Si2168-B40/d8da7ff67cd56cd8aa4e101aea45e052/dvb-demod-si2168-b40-01.fw -O /lib/firmware/dvb-demod-si2168-b40-01.fw

sudo wget http://palosaari.fi/linux/v4l-dvb/firmware/M88DS3103/3.B/dvb-demod-m88ds3103.fw -O /lib/firmware/dvb-demod-m88ds3103.fw

4.4. Hdhomerun Tuners

The following has been extracted from @HarryL’s posts - hope I have got it right!

sudo apt-get install libhdhomerun-dev 
cd /usr/src

ln -s /usr/include/libhdhomerun/ /usr/lib/libhdhomerun

wget http://downloads.sourceforge.net/project/dvbhdhomerun/dvbhdhomerun\_0.0.15.tar.gz

tar zxvf dvbhdhomerun\_0.0.15.tar.gz

cd /usr/src/dvbhdhomerun-0.0.15/userhdhomerun


make install

5. Build/install Tvheadend Server

As of 6/4/2015, I have been unable to get the App Store versions to work, so by courtesy of @HarryL have compiled & installed the latest github version using the following commands via putty & SSH {user = osmc, password= osmc}:

sudo -s

apt-get update

apt-get install git build-essential pkg-config libssl-dev dvb-firmware-osmc dvb-tools libdvbv5-0 liburiparser-dev liburiparser1 libavahi-client-dev zlib1g-dev libavcodec-dev libavutil-dev libavformat-dev libswscale-dev

adding libhdhomerun-dev libhdhomerun1 hdhomerun-config cmake to the last command for hdhomerun network tuners.

cd /usr/src

git clone https://github.com/tvheadend/tvheadend

cd tvheadend



The first part takes around 10 minutes to complete, and the second a further 5-6 minutes, after which you need to make the Access Control File using:

(sudo?) mkdir -p /home/osmc/.hts/tvheadend/accesscontrol

sudo nano /home/osmc/.hts/tvheadend/accesscontrol/1

inserting the following lines:

"enabled": 1,
"username": "osmc",
"password": "osmc",
"comment": "Default access entry",
"prefix": ",::/0",
"streaming": 1,
"dvr": 1,
"dvrallcfg": 1,
"webui": 1,
"admin": 1,
"id": "1"

followed by ^O, Enter, and ^X to save the data and exit. You then need:

chown -R osmc:osmc /home/osmc/.hts

The final step is to ensure Tvheadend runs every time you reboot, requiring

 sudo nano /etc/rc.local

and inserting the line:

/usr/src/tvheadend/build.linux/tvheadend -u osmc -g video -C &

for my tuners and:

modprobe dvb\_hdhomerun

 sleep 4

 /usr/local/bin/userhdhomerun -u osmc -g video -f &

 sleep 4

 /usr/src/tvheadend/build.linux/tvheadend -u osmc -g video -C &

for hdhomerun tuners. Save the data and exit using ^O, Enter, and ^X.

Then reboot by clicking on the Confluence on/off button icon (circle with short vertical bar at top) and then clicking on Reboot or:

sudo reboot now

6. SetTing up Tvheadend

6.1. General

Tv headend is set up using a web page accessed using your PC browser, and all the instructions within this section refer to the PC, not the Pi/OSMC directly. If you have installed SAMBA , the URL to enter your browser is http://OSMC:9981, otherwise use http://x.x.x.x:9981 where x.x.x.x is the Pi’s IP address (obtainable from System - Settings - Addons - OSMC Settings - Network or System - System info - Network). The disadvantage of the latter is that it may change if you disconnect your Pi from the network by rebooting or powering off.

N.B. Using the above version of Tvheadend you do not need a username or password, but with the App Store version you they are both “osmc”.

Having logged in, you should see something like:

6.2 General Settings

Select Configuration/General, Select the language you wish to use language, click on right arrow in the Language Selections box so it appears under “Selected” & click on Save Configuration

6.3 Networks

At this stage there should be no entries. Click on “Add” and in the subsequent boxes:

  • Choose your network type, DVB-T in my case for Freeview (whether just SD or both SD & HD)

  • Network name - anything you like - I chose “Freeview” and have assumed that below.

  • Skip Initial scan - uncheck

  • Pre-defined muxes - from the drop-down list select your transmitter (UK-Sudbury in my case) if it is there - I suspect it only lists the main UK transmitters and not the local satellites.

  • Network discovery - uncheck if you found an appropriate entry in the list or if you would prefer to enter all the mux data manually - see below.

leaving other parameters at their default values, and click on Create (You may need to move the box to make this visible at the bottom). Go to the Muxes tab. If you found your station in the list now you should see the muxes for your area, all with scan status = “PEND”, otherwise you have the choice between:

  • Manually creating muxes for each of the frequencies of your local transmitter


  • Manually creating a mux entry for one frequency and using the “network discovery” option above.

The disadvantage of the latter is that mux entries are created for all the associated satellite transmitters, so many will fail during the scanning process, and you could encounter problems if you pick up the same channels from more than one transmitter (certainly the latter causes problems for users of the Topfield PVRs).

Details of transmissions from all 2023 TV transmitters in the UK can be found here.

6.4. TV Adapter

Click on the TV adapter tab, and you should see your device. Click on the lowest level entry for that device, to set up its parameters as follows:

  • Enabled - checked
  • Network - Freeview from the drop down list (or whatever name you have used)

and then click on “Save”. If you now go back to the Muxes tab, you should see the “Scan Status” for all valid muxes change to “Idle”, and the “~Serv” column have non-zero numbers thus:

Note that if you only have an SD tuner, HD mux scanning will fail. Though not necessary, things will look tidier if you manually delete all failing muxes.

6.5. Rescanning

If you want to rescan at any time to receive new channels etc, go to Configuration - DVB Inputs - Networks, Select the Freeview network (or whatever you have called it), and then Click on “Force Scan”. I think this adds to rather than replaces existing services, so deletion of all services first may be appropriate.

6.6. Editing & Mapping Channels

Having successfully completed the scans, the next task is to remove or disable all the unwanted channels, such as the unnamed channel that seems to appear on each mux and those in categories such a shopping, porn, etc according to your tastes. Select the Configuration - DVB inputs - Services tab when you should see something like:

and either click on the relevant “Enabled” check boxes, or select each unwanted channel and click on “Delete” (consecutive channels can be selected using the shift key + click). Click on “Save” when you have finished (and at intermediate points in case you forget).

It is then necessary to click on “Map All” to make the services visible to Kodi, selecting “Merge same name” in the pop-up window.

7. Setting Up Kodi

Reverting to the Pi/OSMC, go to System - Settings - Live TV - General and click on Enabled. A popup box will warn you that you have no PVR add-On. Click on OK, and you will be presented with a list of suitable add-ons. Click on Tvheadend HTSP Client, and then Enable. If you have compiled your own Tvheadend the default settings should be OK, but using the App Store version click on Configure to set username and password to “osmc”.

You should then see a small message about loading channels, and “TV” should have been added to the top level menu. However sometimes the above procedure does not seems to work, and you may need to repeat it.

Now click on TV, and you should see the TV channels listed in LCN order. Click on the one you want to watch and it should appear.

Clicking on the film symbol next to a channel brings up a list of largely self-explanatory options.

8. KNOWN Issues

I would have liked the channel LCN to appear instead or just a serial number, but have not found out how to do this.

The IPTV channels accessed via Freeview (LCN 225 onwards) seem to be ignored in the Tvheadend mapping process, so cannot be viewed.


File not found on your link :confused:


@phate1 Hope it’s OK now. Haven’t found out how to check link before posting.

You got it thanks for sharing I’ll check it out


May I take your doc and turn it into a discourse post? (I will just edit your topic so it’s still under your name).

That way we/you can keep it up to date, it will be searchable here and people can quote from your instructions etc.


Feel free to use it in whatever way you think will give the greatest benefit to potential users - I had thought it was too long to be included in the body of a post.


1 Like

Thank you. It is done. I have removed the original link to your doc to avoid any confusion.


It would appear from your comment, that there is now a link from where we can download the latest copy of this excellent Guide, but being a bit thick, it is not obvious to me where to find this!

Hopefully you can help!

Thanks! :smile:


Hi. I just took @EMJB’s original doc and inserted the content into his original post. It is all there in the first post. So it’s not needed to download the doc anymore :smile:

If I find the time to write up a section on EPG in tvheadend, would you want to add it to your tutorial? I struggled with it a lot and I would have liked to have had a walk-through. My steps would involve installing perl and may be market-specific though (US and Canada), so I’m not sure if they would fit with the overall guide. Let me know.


The EPG just appeared for me using the instructions I gave (I’m not even sure whether it is the broadcast version or being downloaded from the internet!). I’m sure it would be useful to document your experience, whether it is integrated in my guide or not. My inclination would be to separate it and reference it from my guide and from the problem list, but I will leave that decision to whoever is looking after the overall structure.


I have clarified the PCTV model in my instructions in post 1 - it is a tripleStick 292e.


May be worth mentioning at the moment the 292e only works on pi not vero at this stage


I will add these firmware files to the OSMC firmware package. In future, please just PM me if we are missing firmware


Thank you for this nice instruction. Everything is working fine except scanning of muxes. From dmesg and TVHeadend website I see an active TevII s660 but every mux regardless if registered by hand or automatically fails scanning for services.


When I still had that problem after using HarryL’s Tvheadend, it was due to not having the right “firmware” in /lib/firmware. Have you managed to find this for your tuner?


I hope that I have the correct firmware in place. I’m using the same three *.fw files which worked under RaspBMC for the TevII S660 and copied them into /lib/firmware.


I thought I had the right firmware for my WinTV-HVR, having used it on my Pi 1 & RASPBMC, but I have yet to get it working with OSMC & Pi 2 (though I have been concentrating on the PCTV recently).

If/when you resolve your problem, can you let me know the names of the files and the source you used so I can update the instructions to include the Tevll S660.


For section 4.4, you need to run sudo apt-get install libhdhomerun-dev first, if you already don’t have it installed.

Thanks, danyeaw. That sort of feedback is a great help.