Are you aware that this should be achievable through the YTTV app since they're allowing unlimited Sunday Ticket streams from your home IP? I'm not dismissing your use case for piping them through Channels since there are plenty of other reasons you'd want to do so, just wanted to maybe save you some trouble if you didn't know!
Okey-dokey, there's now a multi-arch version of bnhf/ah4c:test that includes ws-scrcpy (the websocket version of scrcpy) -- so please give it a try and let me know how it works for you.
I really like it myself, as it adds the ability to control my firestick devices directly from anywhere. I recommend opening a shell session (which will open in a new tab) before starting the "stream" in the current browser tab. That way, if you want to send an ADB command instead of using mouse-clicks or having the keyboard interact with the device, it's easy to do.
No need to use a remote control or remote control app! Protected and/or DRM'd video streams will not show in ws-scrcpy, but all the menus and pop-ups do -- so it should work well for entering credentials or recovering from unanticipated scenarios:
The container image size has been reduced 10x as well.
Yes. Here's the docker-compose for Portainer-Stacks:
version: '3.9'
services:
ah4c:
image: bnhf/ah4c:test
container_name: ah4c
hostname: ah4c
dns_search: localdomain # Specify the name of your LAN's domain, usually local or localdomain
ports:
- 5037:5037 # Port used by adb-server
- 7654:7654 # Port used by this androidhdmi-for-channels proxy
- 7655:8000 # Port used by ws-scrcpy
environment:
- IPADDRESS=${IPADDRESS} # Hostname or IP address of this androidhdmi-for-channels extension to be used in M3U file (also add port number if not in M3U)
- NUMBER_TUNERS=${NUMBER_TUNERS} # Number of tuners you'd like defined 1, 2, 3 or 4 supported
- TUNER1_IP=${TUNER1_IP} # Streaming device #1 with adb port in the form hostname:port or ip:port
- TUNER2_IP=${TUNER2_IP} # Streaming device #2 with adb port in the form hostname:port or ip:port
- TUNER3_IP=${TUNER3_IP} # Streaming device #3 with adb port in the form hostname:port or ip:port
- TUNER4_IP=${TUNER4_IP} # Streaming device #4 with adb port in the form hostname:port or ip:port
- ENCODER1_URL=${ENCODER1_URL} # Full URL for tuner #1 in the form http://hostname/stream or http://ip/stream
- ENCODER2_URL=${ENCODER2_URL} # Full URL for tuner #2 in the form http://hostname/stream or http://ip/stream
- ENCODER3_URL=${ENCODER3_URL} # Full URL for tuner #3 in the form http://hostname/stream or http://ip/stream
- ENCODER4_URL=${ENCODER4_URL} # Full URL for tuner #4 in the form http://hostname/stream or http://ip/stream
- STREAMER_APP=${STREAMER_APP} # Streaming device name and streaming app you're using in the form scripts/streamer/app (use lowercase with slashes between as shown)
- CHANNELSIP=${CHANNELSIP} # Hostname or IP address of the Channels DVR server itself
#- ALERT_SMTP_SERVER="smtp.gmail.com:587"
#- ALERT_AUTH_SERVER="smtp.gmail.com"
#- ALERT_EMAIL_FROM=""
#- ALERT_EMAIL_PASS=""
#- ALERT_EMAIL_TO=""
#- ALERT_WEBHOOK_URL=""
- TZ=${TZ} # Your local timezone in Linux "tz" format
volumes:
- /data/ah4c/scripts:/opt/scripts # pre/stop/bmitune.sh scripts will be stored in this bound host directory under streamer/app
- /data/ah4c/m3u:/opt/m3u # m3u files will be stored here and hosted at http://<hostname or ip>:7654/m3u for use in Channels DVR - Custom Channels settings
- /data/ah4c/adb:/root/.android # Persistent data directory for adb keys
restart: unless-stopped
The container image is for the "test" version of ah4c that includes ws-scrcpy. You might want to check out this blog post from @johnofcamas for details on setting up ah4c (which is a supercharged version of the original androidhdmi-for-channels project) with Docker.
Good call out. My wife doesn't like "change" and why I was trying to pump through channels so she has one less place to have to try and find something (Amazon, Disney, Netflix oh my), though having to use a separate remote to tune the OON device probably will trigger a reaction from her, so no perfect solution at this point.
Actually there is something else to consider. If you are going to be tuning a stream from Channels via a separate device remote the latency can be maddenly high. Like 2 to 5 second between any kind of button press and any kind of visual reaction on your display. The device will make the changes in realtime, but those changes will be delayed getting to your display because the encoder needs time to process and convert the signal from the HDMI into a stream usable by Channels.
Since my last changes I have not had a single failure. Detecting the video lockup fixed more problems than I realized! If your on the fence give it a go! It's more reliable than watching live because the script will fire off a new intent if it detects a lockup - watching live without channels + ah4c you have to do with ze remote!
EDIT: I think it is a hulu bug but it applies to all providers.
Anybody know what the ADB KEYCODE is for the "TV" button on the FireStick remote? It's the key that brings up the Live TV Guide if that helps. I've tried a bunch of likely possibilities with no joy so far...
@johnofcamas Have you made in progress with Sling TV on ah4c? I'm giving it a shot myself, so let me know if you've figured anything out, or have any promising strategies for tuning thus far.
EDIT: I have a functioning structure figured out. Additional testing tomorrow, including adding more channels to the M3U.
@turtletank If a given app is compatible with the "Live TV" guide, does that suggest (or guarantee) that deep links are supported? And if so, what's the best way to figure out what those links might be?
I have a working solution for Sling TV using keyevents, but I just want to be sure I'm not missing a possible solution using deep links.
Sling supports deep links, but nobody has been able to find links that link to a specific channel and not just a specific program.
Figuring out what the links should be is the challenge. More often than not they just match up to the links used in the browser version of the service, but sometimes you just have to try a bunch of variants until something works (or doesn't).
Some tools/methods that can confirm deep link support and provide clues as to the structure of the supported links:
Use apktool (apktool d app.apk) to decompile the apk and review the contents of AndroidManifest.xml. Each activity is broken down in this file along with the supported schemes, protocals, domains, etc.
If you have adb setup and the app installed you can use adb shell dumpsys package package_name to get the same info. Example:
In here you can see that links such as slingtv://watch.sling.com and http(s)://watch.sling.com are supported links that automatically match up to .MainActivity.
If you want to see the URLs being used by the Live TV feature you can do something like adb shell dumpsys activity | grep https which would give you something along these lines:
Are you able to log into sling tv and view the channels from your computer? Does each channel have a unique address?
The unique part of the yoututbetv address that I used near the start of this thread as an alternative to automation came from the address that shows up in the browser when you turn each channel from your computer. Does sling hide its address when you use it from a browser?
So that does work, although if recollection serves, that ID number will change once this movie is over. Also, perhaps this is expected, but I did get this message: