Project

General

Profile

Feature #6038

HDhomerun channel scan

Added by th0ma7 ^ 5 months ago. Updated 3 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Muxers
Target version:
-
Start date:
2021-05-01
Due date:
% Done:

0%

Estimated time:

Description

I'm using two HDhomerun (quatro and duo) which been working quite well with tvheadend.
In tvheadend the pre-defined muxes does not provide an exaustive list of all the channels that are available in my area. As such channel scanning is a bit painful (I ended-up generating my own dvb_channel.list using wscan + dvbv5-scan)

I tried Jellyfin a few weeks ago and was surprised by its ease of use (although I prefer tvheadend as more reliable). One interesting thing was how it manage hdhomerun: it has the ability to fetch the channel list from the remote adapter. As such it does not need to "scan" for muxes at all, it simply use the already scanned list using the devices API. Option are to use all channels or only favorites or discard disabled ones (as favorites & disable can be done from the admin web page on the hdhomerun).

All in all, it would be great if tvheadend had a similar behavior built-in which would simplify and futher automate the configuration and usage significantly.

History

#1

Updated by th0ma7 ^ 3 months ago

I was looking at various alternatives to automate this.

The easiest would be the following:
- Use IPTV automatic
- Use hdhomerun json mapping URL such as http://<IP>/lineup.json
- Modify TVH to support JSON on top of M3U

Other alternative could be:
- Create a .js script similar to https://gist.github.com/caseyavila/f37abe5490d4abfc83a75e65056bda6c
- Have the ability to call that page from the IPTV Automatic using http://localhost:9981/hdhomerun.html
- that page would provide a M3U listing of all LAN hdhomerun for TVH to use

The two options would alleviate the need of an added cron job to generate an M3U file, from which the IPTV Automatic setting is pointing to file://<path>

I've looked at the code and, I'm definitively not a C-coder... sigh.
I could probably create something such as a webpage with a .js script type-thing.

Interest from a developper to add JSON format to accepted URL would be just great.

Much thnx in advance for considering such feature.

#2

Updated by th0ma7 ^ 3 months ago

Hi all,

If within src/input/mpegts/iptv/iptv_auto.c:

Just before: if (!strncmp(data, "#EXTM3U", 7))

We could check if data if JSON type (such as using json-c):
if (json_tokener_parse(data) != NULL)

If it is then convert to M3U similar to jq query:

$ echo "#EXTM3U" && curl -s http://192.168.80.9/lineup.json | jq -r '.[] | "#EXTINF:-1 tvg-chno=\"\(.GuideNumber)\" tvg-name=\"\(.GuideName)\",\(.GuideName)", "\(.URL)?duration=7200"'
#EXTM3U
#EXTINF:-1 tvg-chno="2.1" tvg-name="CBFT-DT",CBFT-DT
http://192.168.80.9:5004/auto/v2.1?duration=7200
#EXTINF:-1 tvg-chno="3.1" tvg-name="WCAX-HD",WCAX-HD
http://192.168.80.9:5004/auto/v3.1?duration=7200
#EXTINF:-1 tvg-chno="3.2" tvg-name="Movies!",Movies!
http://192.168.80.9:5004/auto/v3.2?duration=7200
#EXTINF:-1 tvg-chno="3.3" tvg-name="Circle",Circle
http://192.168.80.9:5004/auto/v3.3?duration=7200
#EXTINF:-1 tvg-chno="3.4" tvg-name="StartTV",StartTV
http://192.168.80.9:5004/auto/v3.4?duration=7200
#EXTINF:-1 tvg-chno="3.5" tvg-name="ION TV",ION TV
http://192.168.80.9:5004/auto/v3.5?duration=7200
#EXTINF:-1 tvg-chno="5.1" tvg-name="WPTZ-HD",WPTZ-HD
http://192.168.80.9:5004/auto/v5.1?duration=7200
#EXTINF:-1 tvg-chno="5.3" tvg-name="Me TV",Me TV
http://192.168.80.9:5004/auto/v5.3?duration=7200
#EXTINF:-1 tvg-chno="6.1" tvg-name="CBMT-DT",CBMT-DT
http://192.168.80.9:5004/auto/v6.1?duration=7200
#EXTINF:-1 tvg-chno="10.1" tvg-name="CFTM-HD",CFTM-HD
http://192.168.80.9:5004/auto/v10.1?duration=7200
#EXTINF:-1 tvg-chno="12.1" tvg-name="CFCF",CFCF
http://192.168.80.9:5004/auto/v12.1?duration=7200
#EXTINF:-1 tvg-chno="15.1" tvg-name="CKMI",CKMI
http://192.168.80.9:5004/auto/v15.1?duration=7200
#EXTINF:-1 tvg-chno="17.1" tvg-name="CIVM-DT",CIVM-DT
http://192.168.80.9:5004/auto/v17.1?duration=7200
#EXTINF:-1 tvg-chno="22.1" tvg-name="WVNY-DT",WVNY-DT
http://192.168.80.9:5004/auto/v22.1?duration=7200
#EXTINF:-1 tvg-chno="22.2" tvg-name="Laff",Laff
http://192.168.80.9:5004/auto/v22.2?duration=7200
#EXTINF:-1 tvg-chno="22.3" tvg-name="Grit",Grit
http://192.168.80.9:5004/auto/v22.3?duration=7200
#EXTINF:-1 tvg-chno="22.4" tvg-name="Quest",Quest
http://192.168.80.9:5004/auto/v22.4?duration=7200
#EXTINF:-1 tvg-chno="24.1" tvg-name="CIVS-HD",CIVS-HD
http://192.168.80.9:5004/auto/v24.1?duration=7200
#EXTINF:-1 tvg-chno="31.1" tvg-name="WNNE-HD",WNNE-HD
http://192.168.80.9:5004/auto/v31.1?duration=7200
#EXTINF:-1 tvg-chno="33.1" tvg-name="VPBS-1",VPBS-1
http://192.168.80.9:5004/auto/v33.1?duration=7200
#EXTINF:-1 tvg-chno="33.2" tvg-name="VPBS-2",VPBS-2
http://192.168.80.9:5004/auto/v33.2?duration=7200
#EXTINF:-1 tvg-chno="33.3" tvg-name="VPBS-3",VPBS-3
http://192.168.80.9:5004/auto/v33.3?duration=7200
#EXTINF:-1 tvg-chno="33.4" tvg-name="VPBS-4",VPBS-4
http://192.168.80.9:5004/auto/v33.4?duration=7200
#EXTINF:-1 tvg-chno="35.1" tvg-name="CFJP-DT",CFJP-DT
http://192.168.80.9:5004/auto/v35.1?duration=7200
#EXTINF:-1 tvg-chno="44.1" tvg-name="WFFF-DT",WFFF-DT
http://192.168.80.9:5004/auto/v44.1?duration=7200
#EXTINF:-1 tvg-chno="44.2" tvg-name="CourtTV",CourtTV
http://192.168.80.9:5004/auto/v44.2?duration=7200
#EXTINF:-1 tvg-chno="44.3" tvg-name="Bounce",Bounce
http://192.168.80.9:5004/auto/v44.3?duration=7200
#EXTINF:-1 tvg-chno="44.4" tvg-name="Antenna",Antenna
http://192.168.80.9:5004/auto/v44.4?duration=7200
#EXTINF:-1 tvg-chno="47.1" tvg-name="CFHD-DT",CFHD-DT
http://192.168.80.9:5004/auto/v47.1?duration=7200
#EXTINF:-1 tvg-chno="57.1" tvg-name="MLPBSHD",MLPBSHD
http://192.168.80.9:5004/auto/v57.1?duration=7200
#EXTINF:-1 tvg-chno="57.2" tvg-name="NHK-WOR",NHK-WOR
http://192.168.80.9:5004/auto/v57.2?duration=7200
#EXTINF:-1 tvg-chno="57.3" tvg-name="MLKIDS",MLKIDS
http://192.168.80.9:5004/auto/v57.3?duration=7200
#EXTINF:-1 tvg-chno="62.1" tvg-name="CJNT",CJNT
http://192.168.80.9:5004/auto/v62.1?duration=7200

#3

Updated by th0ma7 ^ 3 months ago

Heads-up, I had also sent out a support request to sillicondust in order to modify hdhomerun firmware to have a lineup.m3u page on top of the existing lineup.json.

I've received a positive return on my request which will be passed along to the development team and see if it can be accomodated.

So never know, in turn this feature request in TVH may not be needed afterwads? I'll follow-up if things turns out positively.

Also available in: Atom PDF