HDMI for Channels

Perfect, thank you! (The first one worked, so I didn't try the second recommendation with removing the whole query string). Also, after that one worked, a noob mistake I made when subsequently trying with another channel was to use curly quotes at one point. After I caught that, then other channels worked, too.

So now the biggest beginner question of all —

Now that I have the environment seemingly working, with ADB set up on a Mac and with the .onn stick in the correct state, what do I do with the helper program Aman included in the first post of this thread? I presume I have to install it or place it somewhere, and I've seen some other users with customizations which I can try to muck through, but that first basic step (where does it go?) is my first roadblock.

[Update: I found this post from Aman, so I've now gotten the helper app installed. Next step is to figure out how to modify the scripts for my setup. I believe I saw some posts in here about needed to rebuild each time, so perhaps that's the way to go]

1 Like

Check this out: GitHub - bluenviron/mediamtx: Ready-to-use RTSP / RTMP / LL-HLS / WebRTC server and proxy that allows to read, publish and proxy video and audio streams. Formerly known as rtsp-simple-server.

1 Like

Excellent! Thank you.

Unfortunately I hit a snag with the BlackMagic capture cards. The dreaded HDCP. Ordered a splitter that supposedly bypasses so should have more info next week.

I have androidhdmi-for-channels.sh running and I'm able to tune channels. Everything works fine in a normal tuning case. I'm having an issue if the client fails while watching the channel and then you try to tune to another channel. Video source is a Chromecast device if that makes any difference.

1 - Tune a channel (in my case on a iOS client)
2 - prebmitune.sh runs
3 - bmitune.sh runs
4 - The video plays on the iOS client just fine
5 - I exit the video on the client
6 - stopbmitune.sh runs
I can then tune another channels without errors.

And now for the fail case.
1 - Tune a channel (MSNBC)
2 - prebmitune.sh runs
3 - bmitune.sh runs
4 - the video plays normally
5 - I kill the iOS Channels app and stopbmitune.sh never gets to run
6 - I relaunch Channels and tune to another channel (Bravo)
7 - Does not tune to Bravo and Channels displays got http response code 503 message

Here it the output of the androidhdmi-for-channels.sh for this part.

2023/05/31 13:42:08 tune for  msnbc
2023/05/31 13:42:08 Running [/Users/chrisyoungers/GoLang/androidhdmi-for-channels-main/prebmitune.sh]
already connected to 192.168.0.118:5555
already connected to 192.168.0.118:5555
already connected to 192.168.0.118:5555
2023/05/31 13:42:09 Finished running /Users/chrisyoungers/GoLang/androidhdmi-for-channels-main/prebmitune.sh in 508.625709ms
2023/05/31 13:42:09 Running [/Users/chrisyoungers/GoLang/androidhdmi-for-channels-main/bmitune.sh msnbc]
Starting: Intent { act=android.intent.action.VIEW dat=https://tv.youtube.com/... cmp=com.google.android.youtube.tvunplugged/com.google.android.apps.youtube.tvunplugged.activity.MainActivity }
2023/05/31 13:42:09 Finished running /Users/chrisyoungers/GoLang/androidhdmi-for-channels-main/bmitune.sh in 138.39575ms
2023/05/31 13:42:46 tune for  bravo
[GIN-debug] [WARNING] Headers were already written. Wanted to override status code 200 with 500
[GIN] 2023/05/31 - 13:42:46 | 200 |         404µs |    192.168.0.11 | GET      "/play/tuner/bravo"

If I hit the home button on the Chromecast remote then restart the androidhdmi-for-channels.sh script I'm able to tune channels again.

EDIT: Just to be clear, I've seen a normal exit from the Channels client that does not fire the stopbmitune.sh script.

Is the url and IP to the encoder correct?

I wrote a .bat file for Windows testing to tune all of the channels in Fofer's bmitune.sh script - It works, but I can see a big problem - a lot of the links for live playback in YTTV did not work and I had to update them - I think the post containing the script is 9 days old and already, only msnbc, cnbc, golf, nfl, newsnation and bbcnews worked - all the others required a refresh

I think in order for this to be viable, there has to be some kind of automatic update of the links for live playback of the channels, (or I have to resort to the other method of tuning)

Is this something the Channels developers are willing to do? Or the community at large? Any thoughts on this?

1 Like

What are the manual steps to update the links that would need to be automated?

Would someone who has this working be willing to share your source setup? I remember seeing examples for the main part of the window, but not the other parts.

1 Like

This is the setup and format working for me with Google TV devices and a YouTube TV subscription:

Obviously you’d use your own IP address.

1 Like

Yes. I can use the URL in VLC and see that it just stays on the last station tuned.

The only way that I know how to do this is to go to youtubetv.com on a web browser, log in, navigate to live tv and start playing a channel - you can copy the link from the URL - for example, right now I am watching BBC News and the link is as follows:

"https://tv.youtube.com/watch/g5BmB1qXulc"

Thanks again for these, where can this list be found?

I'm looking for SYFYP. Also PST station ID's for MTV Classic and The Smithsonian Channel, if available...

127.0.0.1:8089/tms/stations/SYFYP

[{"type":"Satellite","name":"Syfy (Pacific)","callSign":"Syfy","stationId":"24533","bcastLangs":["en"],"preferredImage":{"uri":"https://tmsimg.fancybits.co/assets/s11097_ll_h15_ae.png?w=360\u0026h=270","height":"270","width":"360","primary":"true","category":"Logo","text":"","tier":""},"videoQuality":{"signalType":"Digital","videoType":"SDTV","truResolution":""}}]

1 Like

I would love to help with this but I'm afraid this is something too complicated for me at this time.
Hopefully, somebody else will be able to provide assistance with this.

Hmm, I just checked each of 14 of the channels I set up and they're still working over here. For me at least. Not sure what would explain that. We'll see if that's still the case in 2 weeks! Just wanted to mention it as a point of reference...

I don't have a solution to your question, but wanted to add this to the conversation, since I did get a chance to see it, at least on the YouTube TV app. When this pops up, the androidhdmi-for-channels script stops being able to change channels in the YTTV app :frowning:

Fortunately there is a setting in the YTTV app, the "auto-pause" can be changed to 24 hours instead. Perhaps DTV Stream has something similar?

This made me think of this other question:

So now I'm wondering if it's possible (or if it would make sense here) to add "dummy channels" to this particular Collection of HDMI, whose purpose would be to send shell input keyevent 86 commands via adb to each Google TV device, which would stop playing media (stopping streaming) from whatever channel YouTube TV may have inadvertently have been left on a few hours ago.

Might be a useful shortcut of sorts?

1 Like

Well, that's actually a good thing - maybe once the links are setup/refreshed for each individual, perhaps they will work for a long time - I will do more testing when my encoder arrives, but I am approaching all of this as experimental for now, with no real expectations.

There is a simple use case that exists outside of automatic tuning; the encoder could be for all channels clients to watch the same source simultaneously - for example if there is a football game on, multiple locations could watch the feed from the encoder without using up all 3 YTTV streams

1 Like

Are you folks able to add a "stop playing" script [on the android stick] in some way once the recorded show is over, or does it just keep playing on that channel until it's instructed to do otherwise?

yes:

1 Like