Hey, so I know that someone mentioned this before - but based on what you're saying it seems pretty clear to me that you are / were using a sister project "ah4c" and not this project "adbtuner". This project is not about sending remote keycodes, this is about using deep links to drive apps which support such. Both of these leverage streaming "sticks" and hdmi encoders, but they use different mechanisms to control the devices. Your focus and interest on sending keycodes is what is confusing here, but maybe I'm the one who is confused.
Sorry all for being a bit off track.
Yes, you're right mbcomer68, probably more ah4c is what I should be using.
@turtletank, just for your knowledge if you ever are trying to improve compatibility and you want to know what helped my particular app:
- Have all my channels in 'compatibility mode'.
- 'Compatibility mode timer' set to 4 (to suit my app).
- 'Force kill app' and 'Stop playback' set to key event 84(search).
- 'Pre tune compatibility mode' set to key event 3(home) and removed 2s sleep timer.
- 'Keep alive package' set to launch app and then key event 84, so that its on the search tab, ready for the next tune.
May not be useful but I feel like I've gotten it pretty bullet proof this time. Will edit this post in a few days if I run into any issues.
That sure would be overkill for the APP I use XFINITY Stream....
Set Compatibility Mode ...
Launch APP with Deeplink
Close APP
that is all I need.
Yep for sure, I wish I could do the same.
This takes my channel tune speed from around 20seconds before video starts playing to about 5seconds.
So worth the trouble for myself. Plus now ABDTuner handles all the tuner 'priming' and device waking commands, which is nice. And no need to run the streams through ffmpeg now.
Thanks for sharing this.
Interesting. Does ADBTuner also not detect the start of video playback in this app? Even in compatibility mode it should exit way before 30 seconds if video is playing.
Overall it's been a challenge trying to find a generic configuration that works across most apps and devices. You would basically need a completely custom plugin or something just for this one app that overrides the default functionality. I wouldn't want to fill the UI with enough options and widgets to make this possible otherwise. It would be too much IMO.
As has been said, ah4c is a better place for getting this far into the weeds, but I'm always looking for ways to improve compatibility where I can without making things too complex for basic use. I have some ideas that, time permitting, I will implement to extend things a bit.
A little heads-up for any Xfinity ADBTuner users frustrated by having some of their premium movie channels (6 in my case) broadcast with black borders on all 4 sides. I've added an autocrop capability to ah4c (using the LinkPi API, so one of their encoders is required).
Basically, when a movie is broadcast on one of these channels, the aspect ratio is determined and the movie cropped to fill the screen side-to-side. The top and bottom are cropped based on the aspect ratio. More details here:
Deeplinks are used for tuning, in case you're wondering. 
EDIT: Also, I'm willing to add support for other encoders, now that I have the framework in place. If you'd like me to look at adding your encoder, please post whatever details you can find on their API (assuming they have one), in the ah4c thread.
The video would start playing in channels after the 12seconds but because of how slow the app is to do the initial boot, the actually channel won’t start playing til 20+ seconds.
With the app already in the background it loads up super quick, around that 5 seconds.
But if the app is opened, the tab needs to be changed off ‘Live TV’ before another deep link is accepted, hence the keyevent 84 post tune.
Yeah for sure, I get you want this to be as simple as possible for people to set up. With compatibility mode being more brute force if the deep links aren’t working normally.
I enjoy using both ADBTuner and ah4c. I wonder if it might be worth adding something in your tune or stoptune code that would allow an additional optional script to be called? It could call a different script for different tuners in case they are using multiple devices (onn, firetv). auxtune1.sh,auxtune2.sh...auxstop1.sh,auxstop2.sh...If the script is empty or not present it wouldn't change anything at all, but would allow for some individual edge case fixes without messing up the core functionality
This would allow some basic additional logic that individuals could implement on their own without messing with the great simplicity of the main app that works great for most use cases.
I just had an update come through and when it starts, i get the following error.
ModuleNotFoundError: No module named 'httpx' stdout
03/21/2025 23:41 import httpx stdout
03/21/2025 23:41 File "/app/server.py", line 15, in stdout
03/21/2025 23:41 Traceback (most recent call last): stdout
03/21/2025 23:41 ./entrypoint.sh: line 3: alembic: command not found
How do i fix the issue/
Thanks
That's unexpected. Can you provide the image id (hash) for the version you are running? It should look something like "a7b3415c96de"
Thanks for adding this! I’ve set it up, and will test it out with my Amazon devices to see how it goes.
I logged into Synology and deleted the container and ruan the command line and it fired up.
I'm not sure is container manager messed something up but I was able to get the container back online.
Thanks
This is working well, in my limited testing. I tuned in this morning, after not watching all night, and a channel using ADBTuner tuned in 3.64 seconds, per the log.
I noticed “Skipping keep alive tasks as it's currently the top or middle of the hour” in the log. Very clever. I presume this is there to minimize the chance of interfering with scheduled recordings. How wide a time is protected, out of curiosity? I tend to add a start buffer of a minute to my recordings, but occasionally do three.
Great! Thanks for testing!
Yeah, it's probably unnecessary because ADBTuner will already try for 10 seconds to reserve a tuner, but I didn't want a tuner locked for this keep alive feature to block a recording. It's a three minute window (:59 to :01 and :29 to :31).
I'm trying to use a USB tuner and I guess I'm just a little unsure what to use for the Streaming Endpoint URL. Currently using this:
http://10.24.4.25:8089/devices/M3U-Transcode1/channels/12000/stream.mpg?format=ts
I have the USB Tuner setup and working with the nickname of Transcode1 and the channel 12000. When I play that channel it shows what's on Fire Stick. I used the USB HDMI Capture thread to get that setup.
I believe it should be something like:
http://x.x.x.x8089/devices/M3U-XXXX/channels/XXX/stream.mpg?format=ts&codec=copy
What are the XXX's referencing? I added the '&codec=copy' to the end but I still get nothing.
The first set is the IP address of your Channels DVR server. The second is the name of the device as configured in Channels. The last set is the channel number.
I don't know if there is an easier way to get the URL, but in the Channels interface, choose "Copy M3U URL" in the menu shown above. Then open that link in a new browser window and it should download a playlist file.
The URL will be in that playlist file.
It may be helpful to test that URL in VLC (file -> open network) to confirm everything is working correctly before adding it to ADBTuner.
Thanks, getting somewhere!
I copy'd that URL and got:
http://10.24.4.25:8089/devices/M3U-Transcode1/channels/12000/hls/master.m3u8?
Opening that up I got:
http://10.24.4.25:8089/devices/M3U-Transcode1/channels/12000/hls/stream.m3u8?acodec=copy&bitrate=9996&indexed=true&resolution=1080&ssize=1&vcodec=h264
Putting the second one in VLC works, I can see the YouTube TV app open.
I put that URL into the Streaming Endpoint URL, and I have ESPN in my channel list.
But when trying to play the channel I get 'Streaming to the tuner failed. Press play to try again.' I'm assuming my next step is figuring out the correct URLs for the channels?
Good morning.
Updated experimental with keep alive. Tuning time is 4.88 seconds according to log. Much improved.
Have you found a way to open the Weather Channel app on a Firestick and display the live channel? Using Frndly now and works fine but would like to local conditions one the screen.
Best!


