Clay
Posts: 4
Joined: Tue Jan 08, 2013 7:32 pm

Recording Live TV with HDHomeRun & Raspberry Pi 2

Fri Dec 29, 2017 1:17 am

If someone can point me in the right direction, I would really appreciate it. I recently got a SiliconDust HDHomeRun Connect OTA TV tuner and have it installed on my network, receiving about 180 OTA TV stations (Los Angeles Area). I can view Live TV on my main Samsung TV with a Raspberry Pi running LibreELEC/KODI, as well as on my other computers and handheld devices. The HDHR tuner is working great for Live TV.

I have another Raspberry Pi set up with a directly attached USB 3TB HDD set up as a home server, running Raspbian OS. I have folders set up and can share them across the network with the other devices. I would like to add the capability for this RPi to record OTA TV shows as a DVR/PVR back end. I'm not sure the best way to proceed in setting up the DVR function.

HDHomeRun DVR runs on lots of things but looks like it might not do the Recording bit on a Pi. Plex Media Center also has DVR, but I'm not sure it runs on Pi. I've seen mention of TVHead and a few others. I'm new at the DVR stuff and I'm not sure where to start.

Can anyone suggest to me what would be a good approach to add OTA TV Recording capabilities to my RPi Home Server setup, using the HDHomeRun Connect Tuner and the directly attached USB storage drive?

I also understand that the MPEG-2 license may be helpful, but I'm not sure how that is used. Does that allow the DVR software to transcode the MPEG-2 Digital TV streams to compressed MP4 format before storing them on the HDD?

I'm guessing there is a tutorial "out there" but everything I see seems to be for a different configuration, such as running the DVR software on a separate NAS box, or using one Pi for both recording and playing back TV programs. I have separate Pi's, one with Kodi at the TV for fetching and watching either the Live TV from the HDHR tuner, or recorded content on the Home Server, which uses a second Pi just for that purpose.

Thanks for reading. I'm learning a lot and learning it fast. I think I have all the right pieces in place and working, except for the DVR function. Please help me to "connect the dots" here.

Thanks!

Clay

DarrenHill
Posts: 182
Joined: Fri Oct 03, 2014 3:03 pm

Re: Recording Live TV with HDHomeRun & Raspberry Pi 2

Tue Jan 02, 2018 12:36 pm

Sounds like almost the exact same set-up I have running at home.

I've a Pi3 with the MP2 license running LibreElec (Kodi) connected to the TV, a second Pi3 with a 2TB hard drive connected to it which runs TVHeadEnd as part of an OpenMediaVault set-up (although you could run it under Raspbian too just as easily) and that fed from a HDHomeRun Connect.

The license is for the playback (enabling hardware support rather than just software support for the decoding). Nothing to do with transcoding, and to be honest I wouldn't even attempt to transcode on a Pi as it's not powerful enough for the task.

The part you're missing is the TVHeadEnd server on the second Pi, which is the bit that allows the recording. I had to hunt around a bit to get an installable file that worked with my HDHomeRun, but a quick request for help there on the TVH forum sorted me out. The link below is the thread there, and there's a link in it to where I got the TVH file that worked for me.

https://tvheadend.org/boards/5/topics/25831

I've also got the (paid version of) the TVHClient app on my Android tablet, which I use to set up recordings etc. But you can also do that via the TVHeadEnd add-on in Kodi, and of course you can access and play back your recordings via that as well.

The storage on the hard drive will be in .ts format, which Kodi can read and playback just fine natively.

Another option is to look at OSMC instead of LE, as that has a TVH server available from its built-in repo if I remember correctly (or you can set it up on the second Pi and just use it as a headless server).

The second link below may also be useful, as it details some more on how to install the official TVH on the Pi. That said this (or the earlier version of it) was the one I had issues with that it didn't see my HDHomerun. But that was then, and it may work now. I just include it for completeness...

https://tvheadend.org/projects/tvheaden ... Repository

Clay
Posts: 4
Joined: Tue Jan 08, 2013 7:32 pm

Re: Recording Live TV with HDHomeRun & Raspberry Pi 2

Wed Jan 03, 2018 5:42 am

Thanks for the reply and the links. I was able to get the TVHeadEnd server set up on my RPi Home Server with Raspbian. It seems to be recording just fine. Today I tested the playback with the RPi3 running LibreELEC/Kodi on the TV. It actually played back the recordings just fine, for about 10 minutes. Then it started to heat up and throttle back. Then the audio stream dropped out and the video went all wonky. So I went ahead and got the MPEG-2 license for that RPi. Now the playback runs smooth and the RPi stays cool (around 55C). I'm using the TVH client in Kodi frontend to connect to the TVH server in the back end server.

Now my challenge is getting a more robust EPG working in TVH. I'm trying to follow some guides for pulling ZAP2IT listings into an XMLTV file. I think I am making progress, little by little. I'm no Linux expert, but I'm learning a lot along the way. If I get the EPG working smoothly, I think that I'm ready to call this project DONE! It has been fun figuring out how to use a couple of old Raspberry Pi's and an old 3TB HDD to do something useful.

Clay

DarrenHill
Posts: 182
Joined: Fri Oct 03, 2014 3:03 pm

Re: Recording Live TV with HDHomeRun & Raspberry Pi 2

Wed Jan 03, 2018 9:36 am

It depends a little where you are. I'm in the UK and grabbing Freeview OTA, so I can use the Freeview EPG which is quite good (look in the EPG section in TVH, I think by default it's not enabled). So your stations in LA may also have some EPG information with their signals that the HDHomerun can access too - it may be worth double checking if anything is appearing in the TVH EPG that could just be enabled.

But I've also got webgrab plus installed and running on my media pi (the OMV backend one that hosts the TVH server) as a secondary option as well. It takes a little while to configure, but it's not too difficult and the documentation for it isn't too bad. There is also a configuration add-on for it for LibreElec, but I don't use that as I think that's more designed for a set-up where WG+ is hosted on the same device as the LE install. But you could maybe use that to set up a config file and transfer it over to the server Pi.

It's run as a daily cron job and pulls in EPG data from a few different UK sources and keeps my xmltv file topped up and gives me an 8-day EPG that works well (especially when paired with the TVHClient app on my tablet).

I'm similar to you in not being a Linux expert, but it was quite a nice little project as you say to get it all up and running smoothly. I just now need to look at updating it as due to the issue I had in getting the HDHomerun visible to TVH I ended up on an older release (4.1.x iirc) and may be missing out on stuff in the newer 4.3.x version. But I can always build the new one on a different sd card and swap the old one back in again if it fails...

Clay
Posts: 4
Joined: Tue Jan 08, 2013 7:32 pm

Re: Recording Live TV with HDHomeRun & Raspberry Pi 2

Tue Sep 04, 2018 1:43 am

I am resurrecting/updating this thread. It gives the background of using the RPi running TVHeadend server under Raspian as a DVR to record OTA broadcasts using a HDHomeRun tuner. That DVR system has been up and running flawlessly since January. Very stable, no reboots in all that time. I am in the Los Angeles area and we have LOTS of OTA broadcast stations that come in strong using the HDHR tuner. I have them all configured in the TVHeadEnd server application, and import the EPG from Zap2IT. Everything there is also working great.

Silicon Dust has recently announced that they are now offering a Premium TV service for a monthly fee. The Premium network channels (AMC, TBS, FX, A&E, BET, CNN, CNBC, Comedy Central, etc.) show up as new channels on the HDHR tuner, even though they are streaming over the internet connection. Although Silicon Dust has their own DVR software, I would like to keep using my RPi-based TVHeadEnd server setup and add the new IPTV networks to my channel lineup. It seems like it should be pretty easy, but I can't seem to "connect all the dots" on this one. I have updated my Zap2It TV listings to include the new premium networks in the EPG info. But I can't quite figure out how to actually add the new Premium "channels" in the TVHeadEnd server and link the channels to the EPG info.

I'm curious to know if anyone else here has set up a RPi with TVHeadEnd server as a DVR with the Silicon Dust HDHomeRun tuner. Maybe we could kibbitz a bit on how to get the new Premium TV channels integrated.

Thanks!

Clay

Return to “Media centres”

Who is online

Users browsing this forum: No registered users and 10 guests