Featured Posts

Record TV on Raspberry Pi with tvheadend

Posted by Mike Redrobe | Posted in Technology | Posted on 07-06-2014


RpiI’ve had PC running Windows Media Center for a couple of years recording TV, but decided to replace it with – you guessed it – a Raspberry Pi!

The MCE box was using a couple of these gold Kworld USB dual tuners (UB499-T2):

On connecting one to the Pi, initially nothing showed up in /dev/dvb, so I had to download the firmware to get it working:

wget https://github.com/OpenELEC/dvb-firmware/raw/master/firmware/dvb-usb-it9135-01.fw

Next, fetch some required tools:

sudo apt-get update
sudo apt-get install unzip libcurl4-openssl-dev pkg-config git build-essential dvb-apps

Download and compile tvheadend:

git clone https://github.com/tvheadend/tvheadend
cd tvheadend
sudo make install

(the above takes about 5-10 mins on a Pi model B)

Start tvheadend server with a blank password:

tvheadend -C

The rest of the configuration can now be done through your web browser, pointed at port 9981 of the raspberry pi’s ip address:

Select your tuners from Configuration / DVB Inputs/ TV adapters, and click the enable checkbox for each one:


Now goto the Networks Tab and click Add to create a new network

(DVB-T for freeview)

Tvheadend has a list of transmitter to speed up the scan process, you can find your local transmitter by typing your postcode into http://www.ukfree.tv/transmitters.php


Give it a name (e.g. “freeview”), and click create.

Click the Muxes tab, and after a while, you should see channels (“services”) detected in the right hand column below:


Now it has scanned the channels, you can add them into the lineup, click on services, and then “Map-all”:


I had to click play on one of the channels before the EPG would populate, but that may have just been a matter of waiting:


Now you can browse the EPG, and record shows.

An hour long TV show takes around 1GB of space, so SD card storage would fill up quite quickly if left like that, I use an attached 2TB USB HDD, just change the location in Configuration / Recording / Digital Video Recorder / Recording System Path:

To start tvheadend on bootup, add the following to /etc/rc.local before the exit 0 line:
/user/local/bin/tvheadend -f -u pi -g pi

Comments (1)

Do you think this setup will work as-is in the US? My understanding is that US over the air broadcasts are encoded differently than in the UK.

Write a comment