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

Is there any way to use more than one set of scripts?

1 Like

Yes, by running multiple ah4c containers. Each needs to have one or more encoder ports dedicated to it.

My everyday setup has two ports for firetv/directv, two ports for firetv/livetv and one port for development.

The following command will engage whatever screen saver you have set on the Osprey.

adb shell am start -n "com.android.systemui/.Somnambulator"

During testing, I modified the #Device sleep section of stopbmitune to be #Device Saver. Of course you need to update any of the references to sleep to be saver in the script, modify the shell command output and update any supporting text for the logs to say "saver".

Unfortunately I don't have my test scripts any more, or time to test on my production devices. Give it a try if you like. It did work, but my testing showed tuning to be less reliable than sleep. When you change the sleep, you have to fiddle with the "wake" process. As you are not waking the device, I remember having to finding timings for sending a home button command in pretune script. It was just messy and it made my encoder work all the time for no good reason. I spent a considerable amount of time testing.

have fun

1 Like

This project recently sent me on a new quirky rabbit hole to get "sirius xm channels" working. Kinda like an alternative to music choice channels. We are big radio people here. I tested this ah4c project briefly with iheartradio and tunein and it works great. After finagling with the horrid Sirius XM app, it appears sirius xm google home voice commands are broken (can't launch stations via adb basically).

Luckily I have some old sirius xm tuners around (polk xrt12) with a cvbs video output and cvbs tuner from contemporary research. The polk among some other models have RS232. I just bought a serial console on ebay, which should allow me to send serial remote commands over the network from ah4c container. I have some usb serial adapters around that I am going to test with first before that arrives. Super quirky, but this project gives me quite a few ideas to serve up almost any media in a rotating tuner.

1 Like

Just a quick heads up, had to change around some settings for my Osprey boxes after they recently updated firmware. On previous firmware, waking the Osprey took you to the last channel watched. This was fast an allowed quick tuning. The new firmware takes you to home screen on wake. The home screen takes a while to load causing tuning delays with the AH4C scripts. Luckily there is a quick way to revert back to previous setup.

On each box, go to Settings > Preferences and Set the Start At Home setting to off. Once this is enabled, waking an Osprey will take you to last channel watched, restoring normal AH4C tuning.

1 Like

I pushed a new test version of ah4c today under the :xfinity tag.

Xfinity deep links are used, which means one can also use the ADBTuner project for this purpose. However, since that project isn't open source and ah4c is, I decided to use ah4c. Also, the integrated ws-scrcpy and M3U editor give me additional options since I'm managing this setup remotely:

Guide data using included xfinity.m3u:

M3U editor:

ah4c "Logs & Activity" webpage:

ah4c "ws-scrcpy" webpage for viewing and interacting with streaming stick(s):

For anyone following this and wants to use Xfinity's channel numbers, you'll need to run this sed command on xfinity.m3u after you're done with your edits to add a channel-number M3U tag using the value of channel-id:

sed -i -E 's/(channel-id="([^"]+)")/\1 channel-number="\2"/' xfinity.m3u
2 Likes

@Edwin_Perez With Xfinity, I'm seeing black bars all around on some channels -- mostly premium movie channels that are likely not being broadcast in HD. Do you have any suggestions for FireStick or other settings that might have an effect on this?

The Channels client "Stretch to Fit" option makes no difference with these channels, black bars on all sides remain.

Nothing you can really do about those ... and Channels DVR does not have a zoom option. THE HDHR APP has a ZOOM option when watching those Channels. With my HDHR Primes and AndroidTV Device.

From the Channels DVR server documentation:

Channels has native integration with PlayOn Cloud. Link your accounts together and Channels will automatically download any recording you make with PlayOn Cloud.

This way, recordings from PlayOn are local in your library and yours to watch any time you want. :slightly_smiling_face:

If you have questions about this, it would be better to discuss in another thread because this is off topic here. :wink:

@bnhf ... I am not sure if you have Cable Card with a Prime but I was able to tailor my HDHR windows script to zoom. I do not see a way to ZOOM on XFINITY Stream.

Just Xfinity Stream -- and I don't see a zoom option either. For recorded movies, I suppose I could run them through Handbrake to trim the black bars. Doesn't help me much if I want to watch live, but I guess I could relegate those channels to recording only.

Yeah I even went into display Calibrate and tried to zoom there but for some reason I was unable to ... I could zoom down. I was hoping to set 1 Firestick zoomed just for those channels.

I had a similar idea, as I'm using a LinkPi Encoder for this project, and it has the ability to crop:

I have a one port unit on hand so I can test this out, and if it works, I'll dedicate HDMI-5 to the task with an M3U containing just those problem channels.

1 Like

I am going to try that also .....

image

New bnhf/ah4c:latest (aka bnhf/ah4c:2024.05.04) pushed with support for Xfinity Stream incorporated. Set STREAMER_APP=scripts/firetv/xfinity to use.

If you edit xfinity.m3u with the ah4c M3U Editor, and want to use Xfinity channel numbers, after saving your edits run:

sed -i -E 's/(channel-id="([^"]+)")/\1 channel-number="\2"/' xfinity.m3u

this will create a channel-number M3U tag containing the same value as channel-id.

It appears that in todays :latest image dtvstream.m3u has reverted. It's not the merged version?

Juggling one too many balls today -- sorry about that. Should be fixed now, so pull :latest again please.

pullled :latest looks good! thankyou

It turns out there were more regressions in directv, dtvstream and Amazon Prime LiveTV scripts in :2024.05.04 brought on by returning to my Home Lab setup for builds. Fixed now though I do believe, and pushed today as :latest and :2024.05.06.