AndroidHDMI for Channels (ah4c): A virtual channel tuner using HDMI Encoder(s) + streaming stick(s)

I've built an :appletv.test2 that uses the previous release of pyatv (0.14.5), but adds tesseract-ocr. See if this starts properly for you -- especially during spin-up when the pairing is checked.

1 Like

:grin: Worked perfect...Here is the startup log :grin:

 Deep Sleep: False

Identifiers:
 - 4C852F58-5C9D-4A8F-AAA3-86FAE2A32B65
 - D0:03:4B:1F:2C:09
 - D0034B1F2C09

:
 - Protocol: Companion, Port: 49153, Credentials: None, Requires Password: False, Password: None, Pairing: Mandatory
 - Protocol: AirPlay, Port: 7000, Credentials: None, Requires Password: False, Password: None, Pairing: Mandatory
 - Protocol: RAOP, Port: 7000, Credentials: None, Requires Password: False, Password: None, Pairing: Mandatory
Existing ./scripts/firetv/directv/prebmitune.sh found, and will be preserved
Existing ./scripts/firetv/directv/bmitune.sh found, and will be preserved
Existing ./scripts/firetv/directv/stopbmitune.sh found, and will be preserved
Existing directv.m3u found, and will be preserved
Existing dtvosprey.m3u found, and will be preserved
Existing dtvstream.m3u found, and will be preserved
Existing foo-fighters.m3u found, and will be preserved
Existing fubo.m3u found, and will be preserved
Existing hulu.m3u found, and will be preserved
Existing livetv.m3u found, and will be preserved
Existing npo.m3u found, and will be preserved
Existing silicondust.m3u found, and will be preserved
Existing sling.m3u found, and will be preserved
Existing spectrum.m3u found, and will be preserved
Existing youtubetv_shield.m3u found, and will be preserved
Existing youtubetv.m3u found, and will be preserved
[START] ah4c is starting
[ENV] Not loading env
[ENV] IPADDRESS                  192.168.1.101:7654
[ENV] ALERT_SMTP_SERVER          
[ENV] ALERT_AUTH_SERVER          
[ENV] ALERT_EMAIL_FROM           
[ENV] ALERT_EMAIL_PASS           
[ENV] ALERT_EMAIL_TO             
[ENV] ALERT_WEBHOOK_URL          
[ENV] ALLOW_DEBUG_VIDEO_PREVIEW  
[ENV] Creating tuner             1
[ENV] ENCODER1_URL               http://192.168.1.41/live/stream3
[ENV] TUNER1_IP                  192.168.1.54
[ENV] CMD1                       
[ENV] TEECMD1                    
[ENV] PRE SCRIPT                 ./scripts/atv/spectrum/prebmitune.sh
[ENV] START SCRIPT               ./scripts/atv/spectrum/bmitune.sh
[ENV] STOP SCRIPT                ./scripts/atv/spectrum/stopbmitune.sh
[ENV] REBOOT SCRIPT              ./scripts/atv/spectrum/reboot.sh
[ENV] Creating tuner             2
[ENV] ENCODER2_URL               http://192.168.1.41/live/stream4
[ENV] TUNER2_IP                  192.168.1.55
[ENV] CMD2                       
[ENV] TEECMD2                    
[ENV] PRE SCRIPT                 ./scripts/atv/spectrum/prebmitune.sh
[ENV] START SCRIPT               ./scripts/atv/spectrum/bmitune.sh
[ENV] STOP SCRIPT                ./scripts/atv/spectrum/stopbmitune.sh
[ENV] REBOOT SCRIPT              ./scripts/atv/spectrum/reboot.sh
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)
[GIN-debug] GET    /favicon.ico              --> github.com/gin-gonic/gin.(*RouterGroup).StaticFile.func1 (2 handlers)
[GIN-debug] HEAD   /favicon.ico              --> github.com/gin-gonic/gin.(*RouterGroup).StaticFile.func1 (2 handlers)
[GIN-debug] Loaded HTML Templates (11): 
	- status_and_logs.html
	- 
	- config.html
	- index.html

	- m3us.html
	- routes.html

	- edit.html
	- editm3u.html

	- logs.html
	- status.html
	- stream.html
[GIN-debug] GET    /static/*filepath         --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (2 handlers)
[GIN-debug] HEAD   /static/*filepath         --> github.com/gin-gonic/gin.(*RouterGroup).createStaticHandler.func1 (2 handlers)
[GIN-debug] GET    /                         --> main.run.func1 (2 handlers)
[GIN-debug] GET    /routes                   --> main.run.func2 (2 handlers)
[GIN-debug] GET    /play/tuner:tuner/:channel --> main.run.func3 (2 handlers)
[GIN-debug] GET    /m3u/:channel             --> main.run.func4 (2 handlers)
[GIN-debug] GET    /env                      --> main.run.func5 (2 handlers)
[GIN-debug] GET    /logs/text                --> main.run.func6 (2 handlers)
[GIN-debug] GET    /logs                     --> main.run.func7 (2 handlers)
[GIN-debug] GET    /status/andlogs           --> main.run.func8 (2 handlers)
[GIN-debug] GET    /logs/json                --> main.run.func9 (2 handlers)
[GIN-debug] GET    /video                    --> main.run.func10 (2 handlers)
[GIN-debug] GET    /status                   --> main.statusPageHandler (2 handlers)
[GIN-debug] GET    /api/status               --> main.apiStatusHandler (2 handlers)
[GIN-debug] GET    /stream                   --> main.run.func11 (2 handlers)
[GIN-debug] GET    /test/webhook             --> main.run.func12 (2 handlers)
[GIN-debug] GET    /test/email               --> main.run.func13 (2 handlers)
[GIN-debug] GET    /status/channelsactivity  --> main.run.func14 (2 handlers)
[GIN-debug] GET    /edit                     --> main.run.func15 (2 handlers)
[GIN-debug] POST   /save                     --> main.run.func16 (2 handlers)
[GIN-debug] POST   /m3usave/:file            --> main.run.func17 (2 handlers)
[GIN-debug] GET    /m3us                     --> main.run.func18 (2 handlers)
[GIN-debug] GET    /editm3u/:file            --> main.run.func19 (2 handlers)
[GIN-debug] GET    /config                   --> main.run.func20 (2 handlers)
[GIN-debug] POST   /configsave               --> main.run.func21 (2 handlers)
[START] ah4c is ready
[GIN-debug] Listening and serving HTTP on :7654

1 Like

Has anyone created a DTVStream deep links M3U yet? I was going to take a stab at porting my regular M3U over, but not sure how I can test it without the companion scripts being there already. What's the best plan for being able to play with this and verify I have it working?

Not that I know of, plus the links you get vary a fair bit based on location and subscribed package.

I would suggest either adding another stick to your encoder (assuming you have an input available), or split off one of your existing sticks and use it with a second ah4c stack. You can use the same data and adb directories for both, the only differences will be which scripts and M3Us are used.

You'll need to remove any such device from your primary stack -- if you repurpose an existing stick. I actually do this very thing myself, with a total of four ah4c stacks using seven sticks and three encoders.

Cool, so which scripts should I use and what should I name the M3U? I see that there is a dtvdeeplinks.m3u, so should I create a dtvstreamdeeplinks.m3u? And can I use the firetv/dtvdeeplinks scripts or do they need to be modified for DTVStream?

I think the best bet would be to copy the dtvdeeplinks scripts over to a new directory, and then use that name in your STREAMER_APP value. dtvstreamdeeplinks would be fine for the directory name, and then you'd name your m3u accordingly as dtvstreamdeeplinks.m3u. Otherwise if ah4c gets updated, and you're using an existing directory and M3U names, any changes you've made would get overwritten.

1 Like

Trying to see if this is worth downloading and setting up for my use case. I have ADBtuner setup mainly for USA Network. But for every other channel I get through HDHomeRun Quarto and TVE. I was curious if this would work with Peacock (recording PPVs), TrillerTV (PPV's), soon Netflix (live next year for Monday Night RAW), and Victory+ (Dallas Stars Hockey). Currently, I just setup manual recordings through Olivetin and manually go to said app and start the stream. I have home assistant setup up remotely so I can do it remote if I have to. I have a custom remote on the dashboard that go directly to each app quicker so that I don't have to find it. But since these "shows" won't have guide data is the only option to keep just doing manual recordings in Olivetin or is this a better option for my use case?

Yeah...it's unlikely you're gonna find a guide for most of those events. Maybe with Victory+ but that has yet to open up shop so nobody knows

It's one of the bigger issues now, you can run anything on any app but won't have guide data for non-channel streaming.

Totally makes since. I’m wondering if there is a way to have reoccurring manual recordings. Instead of having to set them every week or every month in Olivetin. Maybe @bnhf could create something that could make this happen in the Olivetin instance. Then all I would have to do is run a script in Home Assistant and set it up to automate that process.

I was directed to this thread, hopefully someone can give me some guidance here!

I've been using TVE with DirecTV Stream and more and more channels are being removed from it. So I was messing around with Chrome Capture and while it works, it's not passing the wife test. So, I'm now looking into this solution.

We use Emby as a frontend, fed from the Channels server backend, with Threadfin as middleware to prune and massage the channel list. That all more or less works fine, with TVE channels, but not so hot for those that aren't TVE.

Do I need a linkpi enc5-v2 for 4 concurrent streams? If we want to watch different programs in the living room and the kids room for example, that occupies 2 "inputs" on the linkpi with 2 independent streaming devices (like the onn pro)?

Conceptually, I get the idea, I think.

Input 1 on the linkpi = onn pro #1 tuned to NFL Network
Input 2 on the linkpi = onn pro #2 tuned to Nickelodeon
Input 3 on the linkpi = onn pro #3 tuned to Hallmark

..etc and so on

Is that...accurate? Essentially every screen needs its own dedicated backend streaming device? If we wanted to do 6 screens, I'd be looking at the Link Pi ENC8 as the go to device? Or would two enc5-v2's be a better bet? Is the "go to device" a fire stick on the onn pro?

Sorry for asking so many questions!

More tuners = more devices = more hdmi inputs so you'll need a hdmi encoder with enough inputs for your needs. As for onn or firetv, onn has less bloat to deal with so I recommend over it (but if you have some spare firetv devices lying around like I do then, you don't really to buy it)

I haven't heard of anybody using an 8-port LinkPi, so I'd suggest the two 5-port units. As far as the streaming devices go, I'm pretty sure all of us that are using the DTV app with ah4c have FireSticks. The 4K Max first or second generation are best.

I don't think that would be too difficult, if I understand what you're after correctly. Are you saying you'd want an identical manual recording to be generated based on a defined interval?

Brilliant.

I have a spare Onn (non pro) Roku, and fire stick to test with, the Roku is a total non starter I imagine.

Is their a lower end link pi to start with, just to see if I can actually figure out how this all works from a configuration perspective, and if it passes the wife test

There is a single port LinkPi that you could get to do your testing.

What part of the US are you in? If I can think of anybody that's near you, I'll match you up for M3U purposes, as DTV has more regional variation than some other streaming providers.

Yes that is correct. Also, as I am thinking of with the Dallas Stars moving from Bally to Victory+ which won’t have guide date to be able to have a template per manual recording instead of having to input multiple of fields all I would have to do is set the date and time.

Central US, Wisconsin specifically.

I've got the single port Link Pi on order, will be here Thursday to go along with the 4K Max stick. Let's give it the best chance to succeed.

For initial testing you can use the current scripts/firetv/dtvstream value for STREAMER_APP. This particular set of scripts uses a remote control emulation approach to channel tuning. It works well, but is slightly slower than using deeplinks. There will be some local channels and regional sports networks you'll want to add to the M3U.

If you decide you want to pursue capturing deeplinks for your particular DTVStream package and viewing area, I can point you in the direction of how this is done. It's a bit of an advanced process, though most users with solid computer skills can likely find their way through it.

1 Like

I'm reasonably adept at using a PC, the biggest thing we're after is:

  • Stability

If a channel takes a bit longer to tune, it is what it is. We've been using Emby so long the thought of using a different front end to watch is...not going to go over well in this house!