Update on channels: all tested out ok except MLB hung up at the Blackout Screen Due to the Phillies game and would not go away. When I closed it exited to Home ok but it stays on and blocked the next tune until I manualy changed the channel. known issue?
NFL Red zone was ok thanks to you and it did not hang the next tune.
I will give the new build a go. Thank you!
I think what's going on there is that I use the audio stream as a trigger to begin changing the channel. In other words, if you tune to a black screen with no audio, channel changing will never begin. I haven't had that happen myself, but a blacked out baseball game is certainly an example of where it could happen.
Since the DTV app always starts on some channel or another, the audio trick has been a good one to keep from beginning the channel search process too soon. Seems like we need some logic to deal with this, but what that might be is the question. I'll need to give that some thought.
something is not quite right it appears to be somehow tuning from your M3U?
even though it looks right in channels? USA Network HD is not found should be No :"HD"
Doh! I have directv.m3u hardcoded in one spot. Go ahead and use nano to change directv.m3u to dtvstream.m3u in the tuneChannel function in bmitune.sh. I'll fix it and push an update, but I want to be sure you don't find anything else first. It's in this section of the script:
tuneChannel() {
channelName=$(awk -F, '/channel-id='"$channelID"'/ {print $2}' m3u/directv.m3u)
channelName=$(echo $channelName | sed 's/^/"/;s/$/"/')
Ok the fix is in and we are back in business.
I see 104 105 106 4K on my appleTV and My FireTV Cube on my real TV.
Does not show on the FireStick attached to encoder its not at 4K.
Is your encoder 4K? And, if it is, is the stream set to "same as the input"?

As far as dealing with sports blackouts (and the lack of audio to detect):
What if after tuning to a new channel, I run the active audio check again. And if no audio is detected, I'll mark the channel as "blacked-out". Then, when the stop script is run, I can bump the channel "up one" or "down one" (using the equivalent of the up or down arrow on the remote) and set the last_channel file to 0.
This should effectively break what would otherwise be a deadlock, as the DTV app always starts with the last channel used, and in this case that would be a channel with no audio. Bumping the channel to an adjacent channel on exit is fast, and would take care of pretty much any blackout-related issues.
How does that sound (no pun intended)?
testing : it is 4k and yes it is set to match I have it set to H.265 and it does play Top Gun ok
VLC says its at Video resolution: VLC 3840x2160 encoder says3840x2160@30 it drops the fps to 30 from 60
IF I drop the frame rate to 30 Video resolution:VLC 3840x2160 encoder says 3840x2160p@24
Still no 4K in DTVStream though interesting
sounds like it should work punny
This could be an HDCP issue. I believe most of these encoders that have HDCP are at version 1.x. It's possible we need HDCP version 2.x for the DTV app to allow 4K streaming. This is a bit of a wild-ass-guess, but it might be the problem.
Do you have a way to check what HDCP level the devices you have connected to your Apple TV and FireTV cube support?
I know when I first ran Top Gun there was an Amazon popup that Said it needed 2.x and it was only 1.x
or somethiing like that for full 4k
Not in the Spec sheet but a TV review I have says:
HDCP 2.2 Yes
further testing I got a hang on search so I put the sleep back up to 4
seems to be ok now
Bingo, ADBTuner works great, DeepLinks to SlingTV work great, life is good.
Convert hdcp 2.2 to 1.4, problem solved
https://www.monoprice.com/product?c_id=101&cp_id=10114&cs_id=1011414&p_id=15242
Hopefully. I have a similar SIIG product on order, which seemed like a better bet as it's USB powered rather than using a 15V power supply.
Have you tried one of these HDCP converters with an HDMI encoder?
Thanks to a great idea from @turtletank over in his ADB tuner thread I have added tesseract OCR support to the keep_alive.sh script. It will detect Who's watching? and Still there? questions and send a keypad down.
If you are using an app that asks similar questions please send over the text and I will add it to the detector.
Has anyone tried the Bally Sports app?
It isn't a channel so it can't start automatically. Kinda like on demand.
Would there be a way to do a down and center command to go live with a channel?
Remote control emulation is definitely one of the strengths of this extension. For example, down and then center would be:
adb shell input keyevent KEYCODE_DPAD_DOWN;
adb shell input keyevent KEYCODE_DPAD_CENTER
There's more involved, of course, to get up-and-running with a given streamer/app combo.