TVHeadend

Help and support with third-party TV software.
Windows Media Center, J River Media Center, Next PVR, MythTV, InstaTV, etc.
mgranger
Posts: 20
Joined: Mon Aug 27, 2018 3:56 pm

TVHeadend

Postby mgranger » Tue Aug 28, 2018 6:11 pm

I am trying to setup HDHR Quatro with TVHeadend using my Premium TV channels but I can't seem to map them. I am able to find the tuner but I am not sure what type of network these channels will be coming over IPTV? ATSC-C? ATSC-T? Other? Anything I select doesn't seem to be found. I would appreciate some help on this. Is there something else I might be missing with Muxes? No Services are getting mapped?

rpcameron
Posts: 624
Joined: Fri Mar 25, 2016 9:55 am

Re: TVHeadend

Postby rpcameron » Tue Aug 28, 2018 7:52 pm

Natively, Tvheadend will not support the Premium channels.

To use Tvheadend with the Prime, I made a patch for 4.2 that allows for tuning using virtual channel numbers rather than frequency and program IDs. I imagine something similar could be crafted to allow for tuning OTA tuners using virtual channels to allow for the Premium TV service.

The downside to this approach, though, is that if you receive two different broadcasts that both use the same virtual channel number, the tuner will decide which it wants to tune rather you being able to determine that by frequency/PID.

EDIT: Upon reflection, you could facilitate this with an IPTV network, but because of the way tuners are locked and resources shared on the HDHR tuners, the IPTV streams—meaning the Premium TV channels—may not lock and stream as expected.

mgranger
Posts: 20
Joined: Mon Aug 27, 2018 3:56 pm

Re: TVHeadend

Postby mgranger » Tue Aug 28, 2018 8:08 pm

Natively, Tvheadend will not support the Premium channels.

To use Tvheadend with the Prime, I made a patch for 4.2 that allows for tuning using virtual channel numbers rather than frequency and program IDs. I imagine something similar could be crafted to allow for tuning OTA tuners using virtual channels to allow for the Premium TV service.

The downside to this approach, though, is that if you receive two different broadcasts that both use the same virtual channel number, the tuner will decide which it wants to tune rather you being able to determine that by frequency/PID.

EDIT: Upon reflection, you could facilitate this with an IPTV network, but because of the way tuners are locked and resources shared on the HDHR tuners, the IPTV streams—meaning the Premium TV channels—may not lock and stream as expected.
i would be interested in doing this. Is there somewhere that explains how to do this? i am not really sure where to start.
Can you also explain the two different broadcasts on the same virtual channel number. i am not really sure what you mean by this. is this always the case that there is potential that broadcasts will receive the same virtual channel number or is there just potential with the way HDHR sets up there channels?

rpcameron
Posts: 624
Joined: Fri Mar 25, 2016 9:55 am

Re: TVHeadend

Postby rpcameron » Tue Aug 28, 2018 9:02 pm

Regarding two broadcasts sharing a virtual channel number:

Suppose you are near/in-between two different broadcast antennas. In one direction you receive a strong signal from an ABC affiliate that sets its virtual channel to 14.1. From another direction you can also receive a weak signal from a PBS affiliate that also has its virtual channel as 14.1. Generally, the HDHomeRun tuner will select the strongest/best signal between those two channels as the one to present to you as 14.1, meaning it would normally be the ABC affiliate. However, in some off situations, your tuner may think the better signal is from the PBS station, and therefore when you tune to 14.1, instead of getting ABC like you would expect you would actually be getting PBS. This determination is handled by the tuner and cannot be manually overridden. That is the limitation of tuning by virtual channel numbers on HDHR tuners.

As far as how to patch Tvheadend to use tuning by virtual channel numbers:

This requires you to download the source code for Tvheadend, apply the patch (which contains modifications to the Tvheadend program), compile/build a new version of Tvheadend for your machine, and then install it. If you are familiar with building software from source and comfortable patching a source tree, I would be willing to modify my patchset to extend tuning by virtual channel to all HDHR tuners instead of only the Prime. However, if this is not something that you are familiar with doing, then I am not sure it'd be worth the time to do it myself.

In either case, I am willing to post my patchset for virtual channel tuning on the Prime for Tvheadend 4.2. (I did not maintain the patchset for the current 4.3/master development branch of Tvheadend, as I changed it to a new CableCARD network type that has since been merged into master.)

mgranger
Posts: 20
Joined: Mon Aug 27, 2018 3:56 pm

Re: TVHeadend

Postby mgranger » Wed Aug 29, 2018 4:51 am

Regarding two broadcasts sharing a virtual channel number:

Suppose you are near/in-between two different broadcast antennas. In one direction you receive a strong signal from an ABC affiliate that sets its virtual channel to 14.1. From another direction you can also receive a weak signal from a PBS affiliate that also has its virtual channel as 14.1. Generally, the HDHomeRun tuner will select the strongest/best signal between those two channels as the one to present to you as 14.1, meaning it would normally be the ABC affiliate. However, in some off situations, your tuner may think the better signal is from the PBS station, and therefore when you tune to 14.1, instead of getting ABC like you would expect you would actually be getting PBS. This determination is handled by the tuner and cannot be manually overridden. That is the limitation of tuning by virtual channel numbers on HDHR tuners.

As far as how to patch Tvheadend to use tuning by virtual channel numbers:

This requires you to download the source code for Tvheadend, apply the patch (which contains modifications to the Tvheadend program), compile/build a new version of Tvheadend for your machine, and then install it. If you are familiar with building software from source and comfortable patching a source tree, I would be willing to modify my patchset to extend tuning by virtual channel to all HDHR tuners instead of only the Prime. However, if this is not something that you are familiar with doing, then I am not sure it'd be worth the time to do it myself.

In either case, I am willing to post my patchset for virtual channel tuning on the Prime for Tvheadend 4.2. (I did not maintain the patchset for the current 4.3/master development branch of Tvheadend, as I changed it to a new CableCARD network type that has since been merged into master.)
Ok I think that all makes sense. Currently I only have this tuner setup for the Premium Channels although once I know it is working I plan on setting it up with OTA channels so that is good to know.

I have not yet compiled or built software from source or patching a source tree. If it matters I am using TVHeadend on Unraid so I am using a docker. I would assume that in future releases this will get updated to allow tvheadend to get virtual channels for Premium TV.

rpcameron
Posts: 624
Joined: Fri Mar 25, 2016 9:55 am

Re: TVHeadend

Postby rpcameron » Wed Aug 29, 2018 6:50 am

I would assume that in future releases this will get updated to allow tvheadend to get virtual channels for Premium TV.
That is unlikely. The only reason that the Prime/CableCARD networks are now supported in Tvheadend 4.3 is because I wanted that feature. Others in the past have asked both on these forums and on the Tvheadend forums for ways to get the Prime to work with Tvheadend and found several tricks or workarounds. However, it took someone with some free time and motivation to actually make it happen.

I imagine the Premium TV situation will be similar. Perhaps with the number of OTA users of HDHR tuners far greater than Prime users on Tvheadend, someone else may decide to write support for Premium TV sooner rather than later.

mgranger
Posts: 20
Joined: Mon Aug 27, 2018 3:56 pm

Re: TVHeadend

Postby mgranger » Wed Aug 29, 2018 7:17 am

I would assume that in future releases this will get updated to allow tvheadend to get virtual channels for Premium TV.
That is unlikely. The only reason that the Prime/CableCARD networks are now supported in Tvheadend 4.3 is because I wanted that feature. Others in the past have asked both on these forums and on the Tvheadend forums for ways to get the Prime to work with Tvheadend and found several tricks or workarounds. However, it took someone with some free time and motivation to actually make it happen.

I imagine the Premium TV situation will be similar. Perhaps with the number of OTA users of HDHR tuners far greater than Prime users on Tvheadend, someone else may decide to write support for Premium TV sooner rather than later.
I am hoping there is someone out there willing to do this for the Premium TV sooner rather than later. I would attempt it myself but I am pretty sure my knowledge for this type of thing is not quite there yet.

gtb
Expert
Posts: 3625
Joined: Thu Oct 06, 2011 1:00 pm
Location: Sunnyvale, CA USA

Re: TVHeadend

Postby gtb » Wed Aug 29, 2018 11:19 am

I am hoping there is someone out there willing to do this for the Premium TV sooner rather than later. I would attempt it myself but I am pretty sure my knowledge for this type of thing is not quite there yet.
If you and a few thousand friends want it bad enough, you could consider creating a bounty to pay for the completed work. It might attract someone to do the work. But be aware that many open source project contributions are done to scratch individuals itches (as previously mentioned), not money, so you have to make sure the bounty is sufficient to create quite the rash. Or (and this works on some projects), trade expertice. If you can (say) do really great documentation, exchange that value to the project with someone who can do the code changes you want but sucks with documentation (not at all atypical in a lot of good coders). Individually you both win (and the rest of the users get the benefits of both your contributions). Or you can choose to wait, and hope, someone else cares.

jasonl
Silicondust
Posts: 12778
Joined: Sun Oct 28, 2007 9:23 pm

Re: TVHeadend

Postby jasonl » Thu Aug 30, 2018 12:00 pm

I've never used TVHeadend, but the IPTV system will import an m3u playlist of channels, right? Could probably just use VLC, go into UPnP > HDHomeRun DMS xxxxxxxx > Channels (double click so the list of channels is loaded), then right click on Channels and add to Playlist, then save the playlist as an m3u file. Import that. May require manual cleanup, assigning guide data manually, etc., but I think that would be a start to getting the channels in.

rpcameron
Posts: 624
Joined: Fri Mar 25, 2016 9:55 am

Re: TVHeadend

Postby rpcameron » Thu Aug 30, 2018 2:09 pm

I've never used TVHeadend, but the IPTV system will import an m3u playlist of channels, right? Could probably just use VLC, go into UPnP > HDHomeRun DMS xxxxxxxx > Channels (double click so the list of channels is loaded), then right click on Channels and add to Playlist, then save the playlist as an m3u file. Import that. May require manual cleanup, assigning guide data manually, etc., but I think that would be a start to getting the channels in.
Yes, an IPTV Automatic network would work for the Premium TV channels, but you may run into issues with tuner availability if you use the ATSC/DVB support for your OTA channels rather than virtual channel numbers with the streaming URLs. Also, using the IPTV network type means TCP streaming, whereas the native HDHR support in Tvheadend uses UDP. Not an issue for most, but in my personal experience with HDHR tuners and Tvheadend, TCP streams have caused issues because of packet retransmission, which doesn't occur with UDP.

hugegreenbug
Posts: 7
Joined: Mon Jan 22, 2018 4:12 pm

Re: TVHeadend

Postby hugegreenbug » Sun Sep 09, 2018 11:19 am

I have TVHeadend working well by using an IPTV network for both OTA and premium channels and by using: https://github.com/Jalle19/node-ffmpeg-mpegts-proxy for the premium channels. The only downside is that premium channels are a little slow to start.

Some options in TVHeadend that are important:
General->Base->IPTV Threads should be set to the number of tuners you have. Once the services were created, I disabled automatic checking for the premium channels in the services tab.

For node-ffmpeg-mpegts-proxy, I made the sources look like this:

Code: Select all

{ "name": "CNN", "provider": "HDHomerun", "url": "/cnn", "source": "http://hdhomerun_ip:5004/auto/v1111", "realtime" : "true", "avconvOptions": { "input": [ "-fflags", "+genpts" ], "output": [ "-bsf:v", "h264_mp4toannexb" ] } }
I did try different probesize and analyzeduration options to make the channels start faster. That did work, but sometimes the sound wouldn't start.

Tip: After setting this all up and if you notice issues, check the stream in VLC before concluding that the setup is not working. Sometimes the stream or network connection may be to blame.


Return to “Third Party Software”

Who is online

Users browsing this forum: No registered users and 3 guests