BETA: Chrome Capture for Channels

The main.js is the file that basically has all of the settings and functions. You shouldn't do anything to the main.js unless you are experimenting with settings. If you aren't comfortable with coding, don't screw with it. Aman is still making a lot of adjustments.

There's no harm in starting over:

1 Like

At times I wonder if I got a dud Fire Stick Max. Iā€™ve also had issues in the past with it stuttering on channels that played fine even on an 8-year-old Apple TV, and turning on software decoding helped with that, too. The plan is to go all newer Apple TVs throughout the house, but Iā€™m trying to control my impulses to splurge on a ton of stuff just for Channels.

Chrome Capture Update after 3 full days: This could be a game changer for Channels. Spectrum is running great. NBC/Live has some issues. I am running the latest prerelease of channels using Apple TV 4K. Chrome Capture was updated to v 0.1.10, All is wired. I have fiber with 400M up/down. NBC runs fine via browser but Capture will run fine for various times then the video will freeze and audio continues. No error messages are thrown. Weatherscan runs ok with some occasional stuttering on the crawls but will either timeout or crash after 20 minutes or so. Again, no errors. In both cases I can hit the play button on Apple TV and the feed will resume. Spectrum is always flawless. I am hesitant to make changes in the main.js since Spectrum is fine. Just providing this in case it might be of use.

So weird that I have very little issues with NBC stations, but Spectrum isn't watchable.

I can often watch NBC for a couple of hours after hitting play on remote twice. It changes channels to last watched then back to NBC. I wonder if it is on the Apple TV side.

Strange about Spectrum. No issues at all.

Yeah, I'm with @Channels2021, not many issues with NBC site, but Spectrum is poor. Running on i5-12th gen server with Windows 11 and updated Chrome.

How do we know what version of the Chrome Capture that we currently have? Is there an easy way to update it?

1 Like

So some observations from my setup, running on a headless Mac mini M2 Pro...

  1. The first time you try to tune in a channel (say NBC) after starting CC4C, things almost always fail with a "tuner lost" error message in Channels. Once Chrome is up and running after that first time, things always work.

  2. Quality: I can get great quality if I use a headless HDMI adapter and set the resolution to something higher than 1080p (1920x1080). But if it's set for exactly 1080p (with or without the headless HDMI plug), quality is suboptimal, and I'll randomly see the black bars that others have reported. Setting the resolution to 1440p (2560x1440) fixes this and I get a perfect result every time.

  3. Performance: On an M2 Mac mini...it's been terrific. Multiple streams come up just fine...I've seen no stuttering or meaningful video issues. As long as the display is set to be greater than 1080p. If it's 1080p or below, I see the quality issues described above.

  4. Overall, it's a pretty reliable solution once it's up and running so far. Understanding its early days, I'd love to see it do better error handling and recovery...but that's the inner perfectionist in me. The tradeoffs are more than worthwhile relative to the win of getting back the NBC family of stations and it feels like a good long-term solution to the DRM challenge for CDVR.

Some error messages in case they are helpful for @tmm1, running on the latest GH pull as of June 28th.:

/Users/CDVR/chrome-capture-for-channels/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:429
            return Promise.reject(new Errors_js_1.TargetCloseError(`Protocol error (${method}): Session closed. Most likely the ${__classPrivateFieldGet(this, _CDPSessionImpl_targetType, "f")} has been closed.`));
                                  ^

TargetCloseError: Protocol error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed.
    at CDPSessionImpl.send (/Users/CDVR/chrome-capture-for-channels/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:429:35)
    at ExecutionContext._ExecutionContext_evaluate (/Users/CDVR/chrome-capture-for-channels/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:244:46)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ExecutionContext.evaluate (/Users/CDVR/chrome-capture-for-channels/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:145:16)

and

failed to start stream https://www.nbc.com/live?brand=nbc&callsign=nbc TargetCloseError: Protocol error (Runtime.callFunctionOn): Target closed
    at CallbackRegistry.clear (/Users/CDVR/chrome-capture-for-channels/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:153:36)
    at CDPSessionImpl._onClosed (/Users/CDVR/chrome-capture-for-channels/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:468:70)
    at Connection.onMessage (/Users/CDVR/chrome-capture-for-channels/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:265:25)
    at WebSocket.<anonymous> (/Users/CDVR/chrome-capture-for-channels/node_modules/puppeteer-core/lib/cjs/puppeteer/common/NodeWebSocketTransport.js:62:32)
    at callListener (/Users/CDVR/chrome-capture-for-channels/node_modules/ws/lib/event-target.js:290:14)
    at WebSocket.onMessage (/Users/CDVR/chrome-capture-for-channels/node_modules/ws/lib/event-target.js:209:9)
    at WebSocket.emit (node:events:511:28)
    at Receiver.receiverOnMessage (/Users/CDVR/chrome-capture-for-channels/node_modules/ws/lib/websocket.js:1184:20)
    at Receiver.emit (node:events:511:28)
    at Receiver.dataMessage (/Users/CDVR/chrome-capture-for-channels/node_modules/ws/lib/receiver.js:541:14)
1 Like

Re: NBC News Now: I didn't know that! Appreciate the info.

Some texture to my recommendation:

  • I get a consistent 5-8Mbps bitrate using Plex Live channels.
  • Pluto's bitrates are anemic, in my experience (1-3Mbps max is what I've found).
  • I haven't tried Samsung TV or Xumo.
  • I would favor the Plex Live channels path versus CC4C because it's a direct livestream rather than a screen capture, so I exclude it for that reason. I view CC4C as a "solution of last resort" if we can't get a direct livestream some other way.

Great guide @babsonnexus - wish I had folks helping me with my own open source projects with documentation like this!

Cheers!

If you are running on a Windows/Mac, just end the process for the executable (in Windows, you can do this in Task Manager), go to the Git repo, download the latest executable, overwrite the file you already have, and start it back up again. If you are doing the Docker, do a repull (I'm a big fan of Portainer for doing things like this, everyone has their own preferences).

I recommend also setting up a watch on Github. This way, you'll get an email whenever a new version is released, plus can see what has changed.

image

1 Like

Is that also the case (no stuttering) when you launch a second channel from a second client? This runs well on my M1 Mac mini, but when I load a second channel on a different client, the channel on the first client stutters for a second or two. I don't have an M2, but I do have some other processes running on that M1 Mac, though, so I might dedicate it just to Channels.

Iā€™ve had as many as 3 separate CC4C ā€œtunersā€ going at once (Bravo, NBC, CNBC).

My M2 is dedicated to Homebridge, Plex, and Channelsā€¦and for Homebridge it runs HBUP (homebridge-unifi-protect for those curiousā€¦UniFi Protect to HomeKit connectivity) which runs a lot of FFmpeg streams simultaneously at the same time as well. No issues across the board. I believe the M2 has a dedicated media encoder/decoder that the M1 (base) may not? I canā€™t speak to it Iā€™m afraid.

You might also want to try adding the HDMI headless adapter if youā€™re running your mini headless, as I am, to get resolutions beyond 1080pā€¦Iā€™ve found that made all the difference for me in terms of getting CC4C working reliably. It really doesnā€™t like resolutions at-or-below 1920x1080, in my experience.

1 Like

Thanks. I can view multiple streams on the M1, and they don't stutter once going. It's just the couple seconds when a second channel loads on a second client, that I get a brief hiccup. I'm currently running the M1 connected to a Mac Studio Display and second monitor, but might go headless at some point, so I'll keep in mind the adapter.

Any luck getting the audio to work with the YES Network? I'm experiencing the same issue. The video plays great!

I am looking into maybe using dedicated hardware only for this project in the form of a cheap mini-pc. Does something like this look like it would be able to handle a couple of streams if it only runs CC4C.

GMKtec Mini PC Windows 11 Pro Intel 11th Gen N5105, 10nm 8GB RAM 512GB SSD M.2 2242 Mini Desktop Computer, Micro Computer with Dual HDMI 4K, Dual DDR4, Dual WiFi, Giga, BT4.2& Cooling Fans

Im not particularly thrilled with only 8Gb RAM but if this is only going to be a Chrome player I'm pretty sure that should be enough.

I5 10th gen Windows 11, laptop here.

I think you might need more beef, but I would like to hear other opinions on this.

Beelink Mini PC AMD Ryzen7 5800H 8C/16T(Up to 4.4GHz)+AMD Radeon Graphics, 32G DDR4 3200Mhz+500G M.2 NVME pcle SSD, wifi6+BT5.2+1000M LAN+USB-C, Support Triple Display 4K@60Hz,Gaming/Office/Home. Works great. $375 on AMZ.

1 Like

Great recommendation @Jim_FL , I took your advice through DM and got one of these. I agree, it's been working real well since setting it up yesterday evening. Im also using the Beelink as my headless BlueIris server for 8 cameras and it seems to be performing well for both... So far.

Thanks for the info. I already have a couple of higher power $300 - $500 range mini PCs. Beelinks like you mentioned are awesome. And the Beelink I am using now (which is also my Plex server) is doing great also doing CC4C. I simply want to offload CC4C to its own device. What I was inquiring was more in the simple $100 - $150 range just only to run CC4C. I am asking more about minimum acceptable specs and wondering if a device like the one I mentioned would be powerful to handle just the CC4C experience. This might simply be where I go ahead and buy one and give everyone an update on my experience.

1 Like