ADBTuner: A "channel tuning" application for networked Google TV / Android TV devices

I figured it out. I had to make a new VLAN on my Unifi console and made a separate 2.4 GHz network only. It ended up clearing up the network issues. I guess the Chromecast doesn’t like 5 GHz network. I know I have need to setup a 2.4 GHz network only but just been putting it off but that ended up fixing it though.

Working fine.
With this latest version I actually see the "Who's watching" prompt from Fubo, and then it magically disappears.

It would be amazing if you could come up with anything for the TDS TV+ app.
I don't have a clue where to start. The box they provide is a small android box with the Tivo app that accepts voice commands. I haven't been able to get voice commands working with the app on other android devices. Google wants to step and and direct you to their stuff instead of just changing channel in the TDS app. I was hoping there was a way to pass voice commands over adb.

Oops, this was actually a bug. It was starting the video stream immediately after detecting the profile screen. I just pushed an update (08/16) with a fix. It should now, in most cases, clear the profile screen first.

I took a look at the TDS app and it doesn't support loading any content via URLs so it's most likely going to remain out of scope for ADBTuner.

Not sure if this helps, but the original release of "androidhdmi-for-channels" started with trying to send text commands via adb. It worked, but it wasn't as effective as using URLs to load content so most of the development moved away from that. If you can figure out a set of actions that load the content you might be able to write a shell script that can executed by HDMI for Channels to automate it.

Ok, thanks for looking. Not sure I'm going to stay with TDS for TV due to so many restrictions.

I have a question that is somewhat off topic.
What is the best way to record a stream from these HDMI encoders we are using.
Let's say I want to transfer something from a cloud dvr to local hard drive. So it would be outside of any guide data. I've been looking for some software that would capture the ts stream.

Any ideas?

(I just tried splitting this reply into its own topic so as not to hijack the thread, but can’t figure it out. If anybody is able to do it, feel free)

There’s probably an easier way, but I installed FFMPEG, and then run this command from Terminal (I’m on a Mac):

ffmpeg -t 02:10:08 -i http://192.168.7.152/0.ts moviename.mp4

I start playing something manually (i.e., from the streaming device hooked up to the encoder, which exposes a stream on my local network at http://192.168.7.152/0.ts). This records that stream to my Mac’s home directory, and stops recording after 2 hours, 10 minutes, and 8 seconds. Those numbers can be changed. It saves it to moviename.mp4, which you can change to anything.

I would think VLC could do this (Media -> Streaming), or FFMPEG as cyberskier mentions.

Interesting. I know it plays in VLC, I never tried recording with it.

I have ffmpeg, if VLC doesn't work, I will try this.

Thanks!

1 Like

Sorry, it's Open Network > Stream Output (then set it to a file!)

Not sure where I got Media -> Streaming from LOL.

2 Likes

@turtletank The original androidhdmi-for-channels has been very much superseded by what's now known as ah4c -- which has been containerized by me. :slight_smile: I'd suggest not referring people back to the original project as we've come such a long way since then.

I use the ah4c project everyday with multiple FireSticks and the DirecTV app -- which requires a "set of actions" like you describe. Tuning is not as fast as what's possible with deep links, but it can be every bit as effective. My impression is that there are more apps that don't work with deep links than those that do, so having ah4c available (and known) is an asset to the Channels Community.

The original project was a couple of hundred lines of code and some rudimentary scripts. It's now well over 1000 lines -- with much more sophisticated scripts available as templates. The codebase can handle a wide variety of capture devices, and scenarios that inevitably arise using this "capture" approach to virtual tuning.

I've recently integrated ws-scrcpy into the project, so that the attached Android devices can be accessed through a browser tab with the mouse and keyboard available for entering credentials or dealing with unanticipated issues. A companion shell session can also be opened with the device in an adjacent tab.

Details on the container can be found on Docker Hub in the bnhf/ah4c repository:

https://hub.docker.com/repository/docker/bnhf/ah4c

For what it’s worth, my intention in linking to that file was to provide an example of how to send a text/voice command via adb to answer the question that was asked.

I lost a couple of recordings to the dreaded Fubo Who’s Watching screen tonight. Would it be possible that the older of my two Fire sticks (which is running Android 7) is different still from the previous Fire TV fix? I’m tempted to scrap the Fire TV’s, but still curious if the fix could work haha.

This is quite a neat project! I wonder how many I’ll need…
Is there a way to pull a report out of channels, to see how many simultaneous streams get recorded each day? I’m thinking about future, where I’ll need to plan to record more than one show at a time, or tune to a channel while recording another, etc…

With TiVo I found that 5 was typically enough, but since channels doesn’t seem to have a limit, I’ve been ignoring what records when.

I just tested it under Android 7 and it worked, but Android 7 is not supported in ADBTuner and I do recommend using newer devices.

If you can provide docker logs from when the profile screen was not cleared that might help me troubleshoot further. Thanks!

@Lawreb, keep in mind these projects were first used to replace channels that have lost TVE, or never had TVE in the first place. The bulk of my channels remain configured with TVE or OTA. So, that can affect how many simultaneous streams you'll need to plan for on these new projects.

1 Like

I use it to record my XFINITY Premium DRM Channels. (HBO,SHOW) etc.

1 Like

I don’t have those as I recreated the docker to update to the newest image after. Oops! :man_facepalming:. I’m on a quest to get you logs of it happening though. Stay tuned :slight_smile:

In the mean time, I’ve ordered a second Chromecast and will switch to those afterwards instead.

Believe it or not it happened on my Chromecast as well, now I'm wondering if it's something I'm doing!

2023-08-17 22:47:54.396 - server - Reserved tuner 4
2023-08-17 22:47:54.396 - server - Using tuner id: 4
2023-08-17 22:47:54.397 - uvicorn.access - 192.168.6.248:37644 - "GET /stream/21 HTTP/1.1" 307
2023-08-17 22:47:54.398 - server - Tuner: Tuning to Fubo Sports 8 on ChromeCast 1
2023-08-17 22:47:54.399 - lib.adb - ADB: Connecting to device (attempt 1).
2023-08-17 22:47:54.569 - lib.adb - ADB: Connected.
2023-08-17 22:47:54.569 - lib.adb - ADB: 192.168.5.197 - dumpsys display
2023-08-17 22:47:54.641 - lib.adb - ADB: 192.168.5.197 - getprop ro.build.version.release
2023-08-17 22:47:54.696 - lib.adb - ADB: Android Version: 12.0.
2023-08-17 22:47:54.777 - lib.adb - ADB: 192.168.5.197 - pidof com.fubo.firetv.screen
2023-08-17 22:47:54.857 - lib.adb - ADB: Stopping media playback.
2023-08-17 22:47:54.857 - lib.adb - ADB: 192.168.5.197 - input keyevent KEYCODE_MEDIA_STOP
2023-08-17 22:47:55.089 - lib.adb - ADB: Force stopping com.fubo.firetv.screen.
2023-08-17 22:47:55.089 - lib.adb - ADB: 192.168.5.197 - am force-stop com.fubo.firetv.screen
2023-08-17 22:47:55.200 - lib.adb - ADB: 192.168.5.197 - am start -a android.intent.action.VIEW -d "https://link.fubo.tv/al1%3Fv%3D1%26a%3Dplay%26t%3Dchannel%26channel_id%3D1238520106" com.fubo.firetv.screen/tv.fubo.mobile.presentation.onboarding.dispatch.controller.DispatchActivity
2023-08-17 22:48:03.752 - server - Tuner: Compatibility Mode - Stream released after 9.35 seconds. Display was on, application (com.fubo.firetv.screen) was closed.
2023-08-17 22:48:03.752 - lib.adb - ADB: Closing connection - 192.168.5.197
2023-08-17 22:48:03.753 - uvicorn.access - 192.168.6.248:37644 - "GET /stream/4/21 HTTP/1.1" 200
2023-08-17 22:48:03.758 - root - Tuner: Stream open (attempt 1).
2023-08-17 22:48:03.820 - httpx - HTTP Request: GET http://192.168.6.192/0.ts "HTTP/1.1 200 OK"

Not sure if it matters, but it's still set up for FireTV

image

1 Like

Good catch! I double checked and that seems to be the name of the package on both platforms.