I thought I would put some instructions together about how to setup Live TV on RaspBMC.
Note - Until the June 2013 release of Raspbmc, Live TV didn't work, although you could listen to live music, record live tv and radio and playback recordings, but if you tried to view Live TV you would just get a blank screen. So if your version of raspbmc is older than June 2013 your first job is to update!
|Hauppauge WinTV Nova-T USB|
Setup your USB TV Tuner hardware
The first thing you need to do is setup your USB TV tuner, I found a Hauppauge WinTV Nova-T USB Stick lying around, if your fortunate to have the same one, continue on, if not head over to http://www.linuxtv.org/wiki/index.php/DVB-T_USB_Devices and see if you can find the firmware for your particular tuner.
Download the firmware
You need to download the firmware to the /lib/firmware directory on your raspberry pi, if you have the same TV tuner as me, use these commands.
sudo wget http://linuxtv.org/downloads/firmware/dvb-usb-dib0700-1.20.fw
Get a MPEG 2 License
In order to play / stream MPEG2 content you will need an MPEG2 license, you can get one of these from the raspberry pi foundation.
Once you receive your licence code, go to Programs, Raspbmc settings, scroll down to MPEG2 license key and put it in.
Don't bother trying to use mine, they are tied to a specific Pi and it will only work on my Pi.
TvHeadend is already installed with Raspbmc, you just need to enable it, goto Programs, Raspbmc Setting, Scroll down to Enable TvHeadend and select it.
You need to open up a web browser and goto the ip address of you Pi using port 9981, this will open up the TvHeadend user interface.
http://<ip of Pi>:9981
Goto Configuration, DVB Inputs, TV Adapters
If you setup your TV tuner correctly, you should be able to "Select TV adapter" from the drop down list. If the list is empty your TV adapter isn't configured properly.
Enable the adapter by ticking the "Enabled" box and clicking Save.
You need to configure TvHeadend with the correct multiplexes for your TV transmitter, if your lucky you may be able to pick your transmitter from the list by using "Add DVB Network by Location", then waiting for "Muxes awaiting initial scan" to reach zero, if however after this the number of services you have got is 0, you are going to have to setup the muxes manually see this post for a how-to. This is because the config files distributed with TvHeadend are out of date.
Once you have a number of services found, click "Map DVB Services to Channels".
Then wait! It'll take a while to map the services, you can watch the progress by opening up the TvHeadend System Log by clicking the small double chevron up arrow in the bottom right hand corner.
In order to get LiveTV working on raspbmc you will need to enable timeshift, this gets round some long standing issues where LiveTV wouldn't play due to a problem somwhere in the raspbmc, xbmc, tvheadend, omxplayer stack, this post on the Raspbmc forum for more info.
Configuration, Recording, Timeshift, Click Enabled and Save configuration.
Settings, Live TV, General - Enable Live TV
XBMC will prompt you to pick a live TV add-on, pick Tvheadend HTSP Client Add-on and enable it.
Be prepared to be patient, because the first time you run it, its going to be slow and sluggish while it setups all the channels, my advice, goto Live TV, All Channels and leave it for a while! Then leave it for a bit longer. During this time it will be downloading the EPG (electronic programme guide), setting up the channels in XBMC and a load of other config.
Then have a go!