AndroidHDMI for Channels (ah4c): A virtual channel tuner using HDMI Encoder(s) + streaming stick(s)

So since this is the Playground, I'm playing around now. :grin:

I'm using Windows 11 Docker and a single capture card with a Fire TV stick, all of which work with the Windows Android ADB project. I used @tmm1's directions to set up the USB HDMI tuner, then Project One-Click to create the ah4c stack and add it to CDVR.

When I try and tune a channel, I get the error below. What looks funny to me is the :7654 being added twice to the url. I tried removing the port from the ip address in the environment variables, but it still adds it. Is this normal and I'm missing something?

[ERR] Failed to start stream for ch8012: M3U: Get "http://192.168.88.30**:7654:7654**/play/tuner/504": dial tcp: lookup 192.168.88.30:7654: no such host

Check your M3U. If your IPADDRESS= env var value includes the port number (recommended), then your M3U should only have //{{ .IPADDRESS }}/ and not //{{ .IPADDRESS }}:7654/

I removed the port number from the env var, but it still shows up twice. I used Project One-Click's create an ah4c Directv M3U action for the file. Could you tell me where it gets downloaded so I could check it?

It doesn't get downloaded, you need to copy-and-paste it into whatever .m3u file you want to use.

Where is this error message from?

EDIT: Can you post a screenshot of your CDVR Custom Channels Source settings?

1 Like
  1. Okay, I can do that.
  2. That error is from the CDVR log.

Actually, as I said, it's (highly) recommended to have the port # in that variable, rather than hard code it in the M3U.

Are you trying to use the Windows Android ADB project to feed ah4c?

Can you post a screenshot of your CDVR Custom Channels Source settings?

Also, your ah4c env vars might be helpful...

Now that I've added the correct M3U, I'm not getting the error anymore, but I need to work through some things.

To answer your question, I'm not trying to use the other project to feed ah4c. Below are the screenshors.



What does your ENCODER1_URL value represent? What's the device behind that?

In the USB HDMI thread, @tmm1 gave directions on how to use a single capture card (like the one for the Windows Android ADB project) with ah4c.

tmm1Channels Developer

Feb '25

To use this with AH4C or ADBTuner, you can use a dual source strategy:

  1. Capture source
  • create custom Text source with configuration for your capture device
  • set the source to disabled
  • copy the channel stream url and use it instead of a linkpi url
    • (for example, http://x.x.x.x:8089/devices/M3U-Capture/channels/9550/stream.mpg?format=ts&codec=copy)
  1. AH4C/ADBTuner source
  • use the M3U from AH4C/ADBTuner to create a second source which is enabled and used for recording/watching

OK I get it, you're using a capture card with your Channels DVR as the encoder. I'm not as clear on how this gives you a second source. A second source for ah4c? What's the upside vs just viewing this stream directly in Channels?

It's not really as much of a second source as it would be something to compare. I've been curious about ah4c for a while and wanted to see how it would work with a capture card and a fire stick.

I get it now, ah4c gives you the channel changing and tuner management just like always, and the combination of the capture card and the Channels transcoder gives you a virtual encoder.

EDIT: And, the second source refers to the second source you need to to create in Channels DVR (since the first is "disabled") for ordinary use as an ah4c source.

@daldana7296

I'll call issues out as I see them:

The first is that your M3U URL can't have spaces in the name. Think Linux, not Windows.

The second is that your env vars tell me you're likely not using the latest Docker Compose. Upgrade to that, and modify your env vars accordingly. You can either do that in Portainer, or delete the ah4c stack and reinstall with the latest version of Project One-Click (published yesterday).

it was on this screen all day until i got home and hit OK. typing in a channel #(re-tune) would have also cleared this screen. ah4c was detecting NO audio that whole time.

ah4c could try to retune if no audio exists for X-min and retry for X-times and if still no audio it could just cancel the tune, and wait for cdvr to try to record the next scheduled show. it could maybe also check for internet connectivity and only retune if internet is back

I realize this was a glitch on their end but it acted just like if my internet went out for more than a few minutes. after a while the osprey gives up trying to reconnect and just shows a message screen and only a user command tells the osprey to retry

I'm going to argue there's nothing for ah4c to do about this. There was a service outage. That's just my opinion. Attempting to retune and detecting audioโ€”that's a lot of weight to pull.

I just think that's outside the scope of this project. That's just my opinion, though. It's up to @bnhf but honestly, I wouldn't go writing something like that myself.

Also, the point is you weren't going to record anything anyway because DirecTV was down.

was it down 9 hours? when they fixed their end, my osprey did not know, or retry automatically.
this is really mainly a problem on channels that get recorded all day and unless you leave a padding gap ah4c only tunes once at the start of the day.

I guess I don't really see how it's a heavy lift if ah4c is already watching the stream for audio, having it loop back to bmitune should be fairly simple.

ok I attempted to look back at the logs again but it's past 24hr so i'm glad i copied at least the 1 line. so it's CC that's listening to the audio, so... it would be tied into that and I can see how that could complicate things.
these days there are many of us that primarily got into encoders for news channels, which we always want recorded so we can skip commercials. unfortunately a failure early in the day continues to effect all day until something tells the osprey to tune something again.

Ok, I've made both of those changes, but I think I've got some work to do on the virtual encoder. I'm getting this error in the ah4c logs.

++ ffmpeg -t 1 -i 'http://192.168.88.30:8089/devices/M3U-USBHDMI/channels.m3u?format=ts&codec=copy' -filter:a ebur128 -map 0:a -f null -hide_banner -

++ awk '/I: /{print $2}'

  • checkLoudness=

++ date +%s

  • (( 1788042130 - 1788042089 > 42 ))

++ echo ' > -50'

++ bc -l

(standard_in) 1: syntax error

  • (( ))

  • echo 'Active audio stream not yet detected -- loudness is LUF. Continuing...'

  • sleep 1

  • true

  • sleep 0

Change your STREAMER_APP value to scripts/firetv/dtvstreamdeeplinks.