Hypnotix and HDHomeRun Tuner

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
User avatar
pilotbob42
Level 2
Level 2
Posts: 56
Joined: Mon Dec 16, 2019 11:45 am

Hypnotix and HDHomeRun Tuner

Post by pilotbob42 »

This is really just a simple 2+2=4 tutorial, but maybe it will help a few folks that don't realize how easy this is. I have an HDHomeRun Prime tuner (the one that works with a CableCard from your cable company), but this should work with the entire HDHomeRun device line-up. I had previously configured this networked TV tuner to work with both Plex and Jellyfin with success, but I still wanted a local network solution for Linux that was as quick and easy as the HDHomeRun app itself on Windows (i.e. a client on Linux that talks directly to the tuner with no intermediate server). Today, I figured out how to do that with Hypnotix.

I stumbled across this project on GitHub that scans your network for an HDHomeRun device and generates an .m3u file with all the channels it has available (from a previous channel scan from the device). This .m3u can be easily loaded into Hyponotix and, voila! Immediate access to your live TV channels from your HDHomeRun device in Hypnotix! A Linux native local app that plays the stream directly from the device!

Steps:
  1. Download the script from the following project on GitHub:
    https://gist.github.com/caseyavila/f37a ... 65056bda6c
  2. Make the script executable and run it while directing the output to a file:
    hdhr-listings-to-m3u.py > hdhr.m3u
  3. In Hypnotix, add a new "provider" and choose "Local M3U file" and add the file you just made above. Call the provider something like "HDHomeRun".
  4. Select the new provider in Hypnotix and select a channel as usual. You are now playing a live channel from your HDHomeRun in Hypnotix!
  5. Optionally, in Hypnotix settings, add the following to the MPV settings to de-interlace the content (if you see combing artifacts) and smooth the playback further:
    deinterlace=yes profile=opengl-hq video-sync=display-resample blend-subtitles=yes interpolation=yes tscale=oversample
Attachments
Screenshot from 2021-06-06 19-04-14.png
Screenshot from 2021-06-06 19-04-14.png (134.02 KiB) Viewed 2834 times
User avatar
ugly
Level 5
Level 5
Posts: 592
Joined: Thu Nov 24, 2016 9:17 pm

Re: Hypnotix and HDHomeRun Tuner

Post by ugly »

Thanks. That worked well.

I had made my own bash script for selecting a channel using the SiliconDust commands and then running it through mpv. It worked, but it was kind of a clunky solution. This is a lot nicer and faster to get started.

For me, to generate the output playlist, I had to run the script using python3 in bash.

And as a tweak, I edited the playlist that was generated to include the channel numbers so that it shows in Hypnotix. You can change the label that shows up in Hypnotix by editing the tvg-name="CHANNELNAME" in the m3u file. I find it easier to navigate with the channel numbers rather than just the network call sign.
User avatar
pilotbob42
Level 2
Level 2
Posts: 56
Joined: Mon Dec 16, 2019 11:45 am

Re: Hypnotix and HDHomeRun Tuner

Post by pilotbob42 »

Glad it worked for you.

I'll add that I just noticed that the script defaults to putting a 2hr timeout on viewing. To opt out of this, edit the script on line 22 to show "use_duration = False". Alternatively, to keep the timeout (as a sort of sleep function), edit the numeric value on line 27 to the duration you want in seconds. Default is 7200 seconds (2 hours) but it can be whatever you want.
duracell80
Level 3
Level 3
Posts: 111
Joined: Fri Sep 23, 2022 5:51 pm

Re: Hypnotix and HDHomeRun Tuner

Post by duracell80 »

To automate setting a provider this seemed to work in Bash:

Code: Select all

HYP_GET=$(gsettings get org.x.hypnotix providers)

# SET AS HYPNOTIX PROVIDER
if [[ $HYP_GET == *"homerun"* ]]; then
    exit
else
    HYP_SET=$(gsettings get org.x.hypnotix providers | sed "s|:']|:', 'HDHomeRun:::local:::file://${HOME}/Videos/iptv-hd-homerun.m3u:::::::::']|" | uniq)

    gsettings set org.x.hypnotix providers "${HYP_SET}"
fi
duracell80
Level 3
Level 3
Posts: 111
Joined: Fri Sep 23, 2022 5:51 pm

Re: Hypnotix and HDHomeRun Tuner

Post by duracell80 »

ATSC-1 lives on until at least 2027 (4 years ... still very few TV's actually have 3.0 tuners):

https://cordcuttersnews.com/the-fcc-say ... d-cutters/

Anyone remember the broadcast flag? This could have safety impacts if relying on network tuners only for local severe weather events. ATSC-3 may come with DRM and so far SilconDust's devices aren't yet certified by NextGenTV. They might get that certification, but right now ATSC-3 is on the struggle bus and SlingTV's AirTV service for me has been valuable during severe weather events.

https://www.youtube.com/watch?v=uxnW3ed9yR4

At the very least stations could turn off DRM for local weather event coverage while also using DRM to discourage IPTV services from re-streaming during prime time. Although why they wouldn't want more viewers of their commercials that seems pretty odd? Instead of seeing IPTV as a threat they could choose to embrace being a competitor to streaming services and save DRM for movies and sports. Why the need to DRM 24/7, seems pretty bizarre.

https://www.eff.org/issues/drm
https://www.eff.org/broadcastflag
Post Reply

Return to “Tutorials”