User Tools

Site Tools


tvheadend

Television Recording

Introduction

In 2017, I started a project to record TV with TVHeadend and stream the recordings to our Chromecasts. I stopped working on it after a few months of development.

Hardware

I started this project before I had my “homelab” and home server. I was using an Olimex Lime2 SBC similar to a Raspberry Pi but with gigabit ethernet and native SATA.

I was using 2 USB DVB-T2 TV tuners to receive over-the-air television signals. The recordings would be saved directly to a 1TB HDD connected to the Lime2. I was using a custom enclosure and power circuity to power everything correctly.

Software

Chromecasts are very picky about what they do and don't play and TVHeadend was recording in an unsupported format. In order to play the recordings on a Chromecast, I had to write a script to transcode all recordings into a supported format. The script I wrote simply looked through the TVHeadend metadata, found the recently finished recordings, and passed those files to ffmpeg for transcoding. The transcoded files were stored outside of TVHeadend and then the original recording was deleted.

I also wrote my own lightweight web interface to browse the recordings and start casting them to a specific Chromecast. This software contained multiple bugs but it worked reasonably well. Due to some performance issues between the client and Chromecast, I wrote a server daemon which would maintain a constant Chromecast connection and the web clients would control the Chromecasts via the daemon instead of directly.

Summary

This project taught me a lot about the specific technical details of Chromecasts but I never got it working well enough for public use. I now use Plex on my home server instead which is significantly more reliable in multiple ways.

If you don't want to pay for the “Plex Pass” plan, you can use the free version and use TVHeadend alongside it. You can configure TVHeadend to record your shows and write a script to name the recorded files correctly and move them into your Plex content directories. This gives you the flexibility of TVHeadend's recording system along with the power of Plex streaming.

Screenshot

This screenshot shows what the TV guide section looked like. This screen allowed users to list upcoming TV programmes and allowed recordings to be scheduled.

tvheadend.txt · Last modified: 2023/02/18 15:34 by 127.0.0.1