Skip to content

Step by step: Tvheadend on a Raspberry Pi with a USB Freeview tuner

0 replies2 viewsStarted 5 hr ago

A Raspberry Pi with a USB Freeview tuner and Tvheadend makes a small, quiet, low-power TV server that streams your own aerial to Kodi and other clients. The steps are: choose a tuner Linux supports, install Tvheadend, add a UK network, scan the muxes for your transmitter, map the channels and connect Kodi.

Quick answer: Plug a Linux-supported DVB-T2 USB tuner into a Raspberry Pi running Raspberry Pi OS, install Tvheadend from its official repository, add DVB-T and DVB-T2 networks with your local UK transmitter, scan, map services to channels, then connect Kodi with the Tvheadend HTSP client add-on.

What do I need?

  • A Raspberry Pi (recent models are fine; check how many streams you want at once) with a good power supply and an SD card or SSD.
  • A rooftop or loft aerial, or a decent shared socket. Indoor aerials often struggle with Freeview HD.
  • A DVB-T2 USB tuner. UK Freeview HD channels use DVB-T2, so a DVB-T-only stick will miss them.
  • A TV Licence for live viewing and recording.

How do I choose a tuner that works on a Pi?

This is where most problems start. Linux support is decided by the chip inside the tuner, and the same product name can hide different chips between versions. Before buying, check the LinuxTV wiki's list of supported USB devices and the Tvheadend documentation for your tuner's model and revision. Look for reports of people running it on a Raspberry Pi specifically, since power draw and firmware files matter on a Pi. If the tuner needs a firmware file, Raspberry Pi OS usually includes them in its firmware packages, but check the tuner's page.

A powered USB hub is worth having if the tuner is power hungry. Plug the tuner in and check it appears by running lsusb in a terminal, then check dmesg for lines mentioning the tuner or a firmware load error.

How do I install Tvheadend?

  1. Install and update Raspberry Pi OS, and connect the Pi by Ethernet if you can.
  2. Add Tvheadend's official package repository, following the current instructions on Tvheadend's own documentation site. Don't use a random script from a video.
  3. Install the package and, when asked, set an admin username and password.
  4. Open the web interface in a browser at the Pi's address on port 9981.

How do I scan UK transmitters?

  1. In the web interface, go to Configuration > DVB Inputs > Networks and add a DVB-T Network and a DVB-T2 Network. HD channels sit on DVB-T2 muxes and some others on DVB-T.
  2. For each network, pick the pre-defined muxes for your area. Tvheadend includes lists named after UK transmitters. Choose the one that serves you; if you're not sure, check which transmitter your aerial points at using the Digital UK coverage checker.
  3. Under Configuration > DVB Inputs > TV Adapters, make sure your tuner is enabled and linked to the networks.
  4. Wait for the scan. Under Muxes you'll see them go from "pending" to scanned, and Services will fill up.

How do I get channels and a guide?

  1. In Services, select the ones you want and use Map services to create channels. Names and numbers are usually filled in from broadcast data.
  2. For the guide, go to Configuration > Channel/EPG > EPG Grabber Modules and enable the over-the-air grabber (EIT). It collects guide data from the broadcasts themselves, so it takes time to fill, and it only covers what the channels send.

How do I connect Kodi?

  1. Create a user for your clients under Configuration > Users, rather than using the admin one.
  2. In Kodi, install the Tvheadend HTSP Client PVR add-on from the official repository.
  3. Enter the Pi's address and the username and password you created (for example your-username).
  4. Restart Kodi when asked and let it load channels.

If that didn't work

If channels don't appear, gather: the tuner model, the output of lsusb, the lines from dmesg about the tuner, which transmitter you chose, and the signal strength and quality shown in Tvheadend's status page. Weak signal is more common than software faults. See also Plex, Jellyfin and live TV from an aerial for the wider options.

Tell us which tuner and Pi you're using, and whether you got the HD muxes locked on the first scan.

Advertise here: reach people setting up their TV

Join the conversation

Sign in or create a free account to reply.