HDMI for Channels

I was looking at Pro Capture HDMI 4K - Magewell

  • Support for capture image resolutions up to 4096x2160 pixels
  • Support for capture frame rates up to 144fps (Actual capture frame rate can be limited by PCIe bandwidth & image resolution)

EDIT: nohdcp - not an issue at least on the 1080 cards!
EDIT2: by far my fav brand absolutely rock solid on linux!

1 Like

Oh yep.

An actually capture card, I was thinking a seperate encoder box.

Do they work pretty much the same as the encoder boxes?

I only have a Mac mini as my server so I can’t use these cards - kind of wish I got a proper pc for this reason.

I think HDfury have some devices for HDCP anyway.

Capture cards work for the most part the same when running on a PC. In the magewell case you get a /dev/videoX for each input. I have a sample env file for magewell in the repo (amongst others).

EDIT: mac minis are limited to breakout boxes and usb devices.

1 Like

In preparation of the release of 1.0 I have renamed the repo to GitHub - sullrich/ah4c

This is to differentiate the work done & I'll open a new thread soon as we get together the final details.

Exciting to finally have a stable replacement for TVE!

3 Likes

Stable yes, but relying on apps and all the stupid stuff they do is going to be a whack-a-mole game. But it's all we have as TVE slowly craps out.

Different onn TV devices?

Hey all, I just went to purchase a second onn TV stick (still waiting for the first) and I noticed that there are two different devices on Amazon.

This one:
https://www.amazon.com/dp/B0B75QMC7X?smid=AM0XQGQ5R0JGB
and this one:
https://www.amazon.com/dp/B0C3RD6CV2

Is the second one a knockoff? Is there a way I can tell when I get them?

No, it's just a rebranding from AndroidTV to GoogleTV. They're functionally identical.

1 Like

Is there a one post / one page writeup on how to put all this together? I have the 4 channel URay + 2 onnTV Android devices.

Which provider are you using?

My plan is mainly Youtube TV, and eventually sling

So, first question, do we use ADB over the network, or is the idea that the Android TV device is connected via USB to a computer?

It's preferable to do all serial but I have a mixture of both right now. Our ENV file will be parsed by the scripts to use either and or. The important part is to auth the script from your Android device to the adb server. I commonly use scrcpy on Linux to ensure that part is set. scrcpy might be available on windows? Not sure.

We are in the process of releasing 1.0 so would love to work with you to help getting started and also document this process. Please send me a message if you are interested.

Interesting. Is there anyways to use this with scrcpy instead of spending hundreds of dollars on a capture card?

1 Like

Unfortunately not. They got wise to this around Android 11 I think? Prior there was no sound support.
Don't quote me on the version, it might be earlier but tested months ago!

EDIT: I should add I use this to auth and once the video starts playing scrcpy will return a black screen.

Windows?!?! Lol.. nah.. it's mac or linux for me :blush:

Good to hear, I use a mac and Linux. Should work well, let us know if you have any questions!

1 Like

Sorry, yes, I do have questions... :blush:.

So, as far as 'next steps' ..

So far I've gotten my RayEncoder on the network, and plugged my onn device via HDMI in, and configured it to connect to my Wi-Fi. I have used VLC to confirm that the stream is sending over the network.

I have a rack in my closet with a couple small Ubuntu machines that are dedicated to just running docker containers, so ideally, I think it would be best if I were to plug my onn into the Ubuntu machines and run scripts from that?

As for the scripts / etc.. is there a repo of the scripts ?? or is there a docker container that is more highly recommended?

Also, I have more than enough engineering skills to help out if you'd like.

1 Like

I just built a container today based on the latest work by @KompilerDJ from his sullrich/ah4c repo on GitHub:

version: '3.9'
services:
  ah4c:
    image: bnhf/ah4c:latest
    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 ah4c proxy
    environment:
      - IPADDRESS=${IPADDRESS} # Hostname or IP address of this ah4c 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

I'd highly recommend you use Portainer if you don't already have it installed. Some sample scripts will end up in your bound data directory on the host, and there are a few more to look at in the repo.

I use and love Portainer. I’ll fire up a stack tomorrow. Thanks!

1 Like

OK, I'm firing things up and I have a couple questions:

  1. Does ADB come with the container image?
  2. Does it work over the network using the TUNERn_IP, or is there a way for adb to communicate via USB through the docker container?
  3. Do I need to do anything to my tuner (onnTV) device to enable adb?
    MORE QUESTIONS:
  4. Which streaming url do I use?
    • TS
    • HLS
    • FLV
    • MultiCast
  5. Is the /data directory meant to be mounted via an external volume?

For reference here's my setup

onnTV Tuner connected via USB to a server running docker
onnTV Tuner connected via HDMI to my URay encoder (slot #1)
onnTV Tuner connected via Wi-Fi to my network

URay encoder connected via Ethernet to my network

ADB is included in the container.

Use the IP or Hostname of the streaming device with port #. USB is untested with Docker, and would be tricky.

Once you fire up the container, with TUNERx_IP env values, each streaming device should ask for ADB approval.

Use the TS stream from your encoder.

The /data directory is what I use on my host to organize Docker data -- you can use whatever you want there.

Here are my env values for example: