HDMI for Channels

You might want to look into ADBTuner ... I use it with XFINITY Stream.

ADBTuner: A "channel tuning" application for networked Google TV / Android TV devices - Playground - Channels Community (getchannels.com)

Newbie to this HDMI Capture Stuff. Picked up this device:
HDMI Capture Device

Got an OON installed just to see if I can setup the link into Channel from HDMI Capture Device:

However, when I try and install in Channels, I get the following error:


image

Any help would be appreciated.

PS, also tried using the HLS link with the HLP format in Channels, similar error.

Your source should point to a .m3u file. Channels gets the MPEG TS ultimately from the m3u file. You can either point to one of the files on the proxy or feed it a block of text by changing URL to text. Heres how mine is setup:

Thanks. Can you clarify "one of the files on the proxy"? I was looking to feed directly from the Capture Device into Channels. If that's not possible, is there a How-To on how to setup the proxy (assuming 3rd party app/script perhaps)?

No, sorry, that's not possible. The proxy is what makes an HDMI capture device into a virtual tuner. We don't really have a how-to at this point, but we will at some point. :slight_smile: What app are you hoping to use on your onn device?

1 Like

I misunderstood the original post in this thread:

My goal is minimally to have the ability to feed NFL Games that I plan on purchasing through YTTV through it so that I can watch the games in any room. I'll rely on a BT remote to tune to the different games I want to watch on the OON device (i know, old school), but that's my minimum requirement.

Eventually I'd like to be able to pull other channels that I can't get through the TVE interface that I otherwise have access to through my provider (currently HULU but thinking of switching over to Fubo given their "on the go" feature). If I did that, then I would want to implement the whole ADBTuner initiative, but that's a hill to climb for another day.

Hey @jator (cc @KompilerDJ and @bnhf ).. I finally pushed my blog post re: putting all of this together (at least for URayCoder and onnTV 4k with YouTube TV).

5 Likes

Nice work! I like the simplicity of your scripts atm. You may find they need to be expanded some to handle special "scenarios" as they arise -- but hopefully not. :slight_smile: If you do find situations that aren't handled currently, reach out to me or @KompilerDJ as we may be able to point you in the right direction.

One thing I noticed from the M3U snippet you posted a while back is that you hard coded the proxy IP into the M3U like this (which is missing the port # btw):

http://192.168.1.128/play/tuner/aRGFZpHQkzY

I'd suggest you use the original variable instead from the example I sent you:

http://{{ .IPADDRESS }}/play/tuner/aRGFZpHQkzY

This picks up the IPADDRESS environment variable from the Portainer-Stack.

Also, we figured out that comments can be added to M3U using "# " (hash followed by a space) -- which is handy for identifying local channels east/west feeds or anything else that you might want as a reminder for you or someone else using your M3U.

I will make sure to correct that in the M3U post that's coming next!

OK, I get where you're coming from now, and you can actually do that. Add a custom channel with something like this for a text based M3U:

screenshot-media-server6_8089-2023.08.14-13_23_08

Use whatever channel-id and name you want, and then use the encoder URL directly. The channel will show-up in your guide blank, with no guide data. It's crude, but should do what you're asking.

You and I both, we'll have to wait to see what the unique YouTube TV Channel IDs are going to be for NFL Sunday Ticket games.

1 Like

Thanks, that's what I was looking for. Tested and I'm able to show content on my "dummy" channel. Now just have to wait for the season to start.....

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.

2 Likes

Is there a docker container for this?

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.

2 Likes

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.

1 Like

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...

EDIT: Found it: KEYCODE_LIVE_TV

1 Like