Chrome HDMI for Channels (CH4C): Chrome channel tuner plus HDMI encoder

@dravenst

PR#1 submitted with DirecTV Stream support.

This is going to be an excellent alternative to PrismCast, which only supports a single stream for this provider. In addition, given ch4c's hybrid use of Chrome + HDMI Encoder, this is a far better solution for remote users, as the encoded stream can be tailored more readily to the connection available. The ability to use a low power PC is also a big plus.

DirecTV Stream Support + M3U Playlist Enhancements

DirecTV Stream — New Service

Adds full DirecTV Stream support as a new streaming service source.

  • Channel discovery (services/directv-service.js): Navigates to the DirecTV Stream guide page and extracts the full channel lineup directly from the React/Redux store via page.evaluate(). Captures channel name, call sign, channel number, station ID (for Channels DVR EPG matching via tvc-guide-stationid), and logo. Local network affiliates (ABC, CBS, CW, Fox, NBC, PBS) are cross-referenced so the bare network name maps to the correct affiliate entry.
  • Login (login-manager.js): Implements a robust two-step authentication flow (email → Continue → password → Sign In). Login-state detection uses a polling approach that watches for both URL redirects away from stream.directv.com and the appearance of a login form in the DOM, avoiding false "already logged in" results caused by the SPA's delayed auth redirect.
  • Post-login interstitials: After login (and on every "already logged in" check), two interstitial screens are automatically handled:
    • Profile selector (/user-profiles): Detected by URL, waits for profile tiles to render, then clicks the first profile.
    • Sports scores overlay: Polls for a "Hide Scores" button and clicks it. Only runs when a profile was actually selected in the current session, making the "already logged in" fast path a near-instant no-op when no interstitials are pending.

M3U Playlist Enhancements

  • ?services= filter: /m3u-manager/playlist.m3u?services=directv,sling returns only channels belonging to the specified comma-separated service(s).
  • ?sort= parameter: /m3u-manager/playlist.m3u?sort=number (default, existing behavior) or ?sort=name (alphabetical). Both params are independent and combinable: ?services=directv&sort=name.
  • Bulk enable/disable: Enable All / Disable All buttons added to the M3U Manager UI for DirecTV and Sling, positioned next to the "Show Enabled Only" toggle. Backed by a new PATCH /m3u-manager/channels/:service/bulk-enable endpoint.
  • Per-service last-refresh timestamps: Each service tracks and displays when its channel list was last refreshed, consistent with the existing Sling behaviour.

Bug Fixes

  • Channels DVR URL construction: CHANNELS_URL values with trailing slashes or embedded port numbers no longer produce malformed API URLs. A buildCdvrUrl() helper normalises the base URL before appending the port and path.
2 Likes

@dravenst

DirecTV Stream support continues to work well (combined with the couple of other small PRs I submitted):

I do have narrow vertical scroll bars on both virtual tuners though, and am wondering if there's a way to get rid of those?

I'm launching ch4c with these parameters:

@echo off
ch4c.exe -s "http://media-server8" -e "http://192.168.110.147/live/stream0:24.42:0:0:Encoder" -e "http://192.168.110.147/live/stream1:24.43:1921:0:MACROSILICON"
pause

Thank you @bnhf for your contributions! I went ahead and merged your PR's and created a new release

@bnhf Can you clarify where you're seeing the 'vertical scroll bars'? If you're referencing the browser scroll bars that show briefly when first loading the stream, I found some streaming sites seem to behave differently when scroll bars are hidden - probably due to bot detection? However, the scroll bars should only appear for a couple seconds and disappear once the stream goes to full screen.

@mackid1993 I'm feeling very good about the DirecTV Stream support we've added to this project. It's candidly a much better fit than PrismCast for DTV, as this project uses one instance of Chrome per virtual tuner, so multiple tuners are supported.

In addition, using an encoder to output a consistent output stream is also a plus -- and has been a significant boon for me to use remotely. I've been configuring H.265 output in the 6-8 Mbps range, which is great for remote use without transcoding.

Given that you're reasonably long on encoders, and all-in on DTV, would you be willing to give this a try? For whatever reason, this project has not gotten the attention it deserves, but it's an excellent combination of all the good aspects of cc4c combined with the power of a dedicated encoder.

1 Like

So I have two Unraid servers, one with a Windows VM with an RTX 4060 passed-through, which I could potentially use. I also have an M1 Mac Mini that's basically sitting and doing nothing right now. The rest of my devices are basically laptops. Do you know of any of my hardware being a good fit for this?

I'd prefer to use the M1 Mac Mini because I could dedicate it to this. I'm just not sure if I would need DisplayLink adapters or something like that.

Edit:

Actually, I have an old NVIDIA P400. That could easily get passed to a VM, and I could test on Windows. This might be a weekend project. It looks like the goal is you get a cheap mini PC, I guess?

I guess my problem is I have everything in my stack virtualized.

This project is supposed to work on MacOS, but it's untested by me. You'd need at least one HDMI port, and two would be better.

A Windows VM should be fine, but you'd definitely need to pass at least one HDMI port through to your virtualization (again, two would be better). The VM itself would need relatively modest resources, enough to run an instance of Chrome per HDMI port.

It's pretty easy to set up, so probably doesn't need a weekend, unless you need extra time for the hardware side.

One of the cool, I think underappreciated aspects of this project, is to be able to run a very complete Channels DVR solution -- including ch4c, on a system with modest resources.

However, in my use, this has been a great alternative to PrismCast for those looking for a more predictable and consistent output stream like we get from ah4c or ADBTuner. Set it up and I think you'll see what I'm talking about. :slight_smile:

1 Like

I'll think of maybe plugging in that P400 over the weekend when I have some time. I think that has four outputs. I will have to order some MiniDP to HDMI adapters because I believe it only has Mini DisplayPort on it. I do have two no name encoders kind of lying around that I can test this with when I get a chance. Thank you for thinking of me, though. I really do appreciate the ping. :slightly_smiling_face:

now tell your spouse you're gonna need 5 more encoders ... tell her it's for the community :rofl:

Throw in a dash of "butterfly effect", and the betterment of mankind isn't out of reach...

@mackid1993 I'm currently running on a windows system with 4 outputs (2 hdmi, 2 usb4). I have two Link Pi ENC1-V3 encoders connected (each supports two outputs), and it has been working well. I did test briefly the mac support when I added it, so it should work ok, but let me know if you end up trying it and see any issues.

The problem is I really don't have the hardware for this. I have to have the time to spin up a VM and open up my server and put a second GPU in and also get some Mini DisplayPort to HDMI adapters. So it is going to be a bit before I can test this. I have the GPU. It's just a matter of having the time and also getting those adapters on hand.

Actually, are you using DisplayLink adapters instead of a GPU? Does that work?

I'm wondering if I can pass DisplayLink adapters via USB over to a VM.

My thinking is that you'd need to pass a graphics card with at least two physical connections for "displays". The GPU on the card would give you hardware acceleration for Chrome, plus the physical connectors would allow you to make connections to the encoder(s).

I have absolutely the perfect card for this. The problem is I have to just get a chance to pick up some Mini DisplayPort to HDMI adapters, as that's all it has.

Once I buy those, I can definitely set this up with a few encoders. Hopefully not annoy my wife too much. :joy:

What are the specs on the system you're using for this?

Just realized I have an adapter in my drawer (and found a 2 pack on Amazon for $4.99 that'll be here tomorrow). So I should be able to get 2 encoders going on a Windows 11 IoT Enterprise LTSC VM. (I like running that specific edition for things like this when Windows is necessary since it's stripped down). Not LinkPi units, but I am in the process of buying a secondhand ENC5 V2 from a community member which will free up 3 ENC1-V3s and this will be a great use for them.

1 Like

Unfortunately the mini DP to HDMI adapter I had lying around was bad. I have two new ones coming today but stayed up a little too late trying to get this to work. Really nice job on the UI, I just couldn't get a video signal out of my encoder. Fortunately pass thru does work as a monitor ended up being fine (I wish I checked that sooner).

Edit: Just wanted to report back that I got this working, and it's working really well! Thank you for the ping @bnhf please let me know if there are any specific areas you want me to test.

I have two spare encoders right now I can use for this. Just a tip that might help others. Parsec is really excellent for remote access and works really well for managing this in a headless setup. It also has a virtual display adapter, which doesn't seem to interfere with the encoders and only kicks in if there is no display connected, such as if all of your encoders are down or something like that.

My Quadro P400 ended up working out great as just a pass-through display output on an Unraid VM. Unfortunately, I spent all last night chasing a bad Mini DisplayPort to HDMI adapter. Fortunately, I picked up some new ones today, and they're working well.

This might actually be helpful for others because those cards are pretty cheap as far as I am aware on eBay. Mine has three display outputs, so that is three potential encoders that can be plugged in on one PC. In my situation, I just used Windows 11 IoT Enterprise LTSC, gave it 4 GB of RAM and a small vdisk and it's working great.

Edit1: I did just find an edge case. I plugged in my second very cheap encoder that I'm using to test this with. They're both different brands, but essentially identical and appear identical. They enumerate with the same audio device. I don't know if there is a good way to differentiate between the two or a better way to handle this. What I ended up doing was going to the old school sound control panel and renaming one of them so I could then edit the JSON file with that name to match them up.

Also, when I plugged in a second encoder, it was really hard to figure out which monitor was which, particularly because I'm in a headless environment. Turned out my first encoder was on the second monitor, so it was just some trial and error. Once you start getting into a lot of encoders, I can see that getting difficult. I don't know how the UX can be improved there, but it's just a suggestion of maybe a way to improve UX in the future.

I also totally stand by Parsec being an excellent way to manage this remotely. The only caveat being it will steal the audio from your stream if you leave it open while trying to stream. So I recommend closing it before kicking off any streams and only using it for remote management as needed. It's just really super low latency and really nice to use with native copy and paste and also free for personal use. It doesn't interfere as long as it's closed before you kick off any streaming.

I found another minor bug but it does break guide order at least on Android. DirecTV has duplicate channel numbers for overflow channels (usually RSNs) which @bnhf knows about. I believe the same logic should be applied to this as project one click. I manually set my channel order for the overflows once I figured out why my channels were all showing out of order!!

Edit: I just ran into some strange buffering and audio sync issues, which is kind of weird. I figured it's probably worth reporting. Sorry, I'm just putting this through its paces and running into things as I go. Earlier while I was using this on my laptop at work, I was also running into some buffering, but I attributed that to being off-site. But now I'm running into buffering at home over Ethernet, which is interesting. Wondering if bumping up the memory of my VM is needed. I tried bumping it up to 8 GB and I'm testing again.

Edit1: When using parsec it's important to disable the volume mute feature: https://support.parsec.app/hc/en-us/articles/32361397157652-Admin-Host-Mute-Option

Edit2 : I am still seeing a lot of buffering despite giving my VM eight cores and 16 GB of RAM. I guess I am going to have to hold off on this project for a little bit. I am not sure what is causing the buffering, but I know these encoders worked fine with my Osprey boxes, so I do not believe it is that.

Sorry to hear that, as it's been working well for me with DirecTV. I agree that it's unlikely the encoders are the issue. Seems more likely to be something related to the virtualization.

Thanks for giving it a try.