BETA: Chrome Capture for Channels

Exactly. How it's changed depends on how you're running it (or want to run it). In the Docker container (amd64 only), it's an environment variable.

1 Like

I am running this on Windows 11 with a Intel Core i7-9700k. No docker, no VM. I just use powershell to run main.js. Truth be told, I am not at all familiar with main.js. Is this something I can just edit with Notepad? Any instructions on where the main.js file is located? After that, do I just save the new main.js and run it again?

@Helios2, yes you can edit the main.js file with Notepad. The edited file can be saved, and then run again. The file will be located where you saved it originally.

1 Like

Follow the directions for "WINDOWS & MAC - NODE (Advanced)" in the simplified directions above:

Thank you for all the help thus far. I found the main.js file and opened it in notepad. I assume this is the section I need to edit:

try {
const stream = await getStream(page, {
video: true,
audio: true,
videoBitsPerSecond: 8000000,
audioBitsPerSecond: 192000,
mimeType: 'video/webm;codecs=H264',
videoConstraints: {
mandatory: {
minWidth: viewport.width,
minHeight: viewport.height,
maxWidth: viewport.width,
maxHeight: viewport.height,
minFrameRate: 60,
},
},
})

A couple of questions:

  1. What have others found to be a good bit rate for video and audio? My initial understanding is the video bit rate is ok, but the audio should be bumped up?

  2. Is it possible to change the codec to h.265, or is that not supported with the chrome capture?

Correct, that is section. I haven't ever played with the audio bit rate. I did try other codecs, video and audio, but always ended up back at the default. I believe the only mods I have currently active are

'--enable-accelerated-video-decode',
'--enable-accelerated-video-encode',

1 Like

Where do you add these lines of code in? Can I add it in the same section as the bitrate info? Do I include the ' -- and , just like you wrote it above?

Is anyone using this successfully with an Apple silicon Mac and YouTube TV? I can’t seem to get a straight answer as I’m using an M2 Mac Mini and when attempting to use the stand alone binary, it runs just fine, however I cannot authenticate with NBC and get a browser unsupported error. Have the devs abandoned this project?

YTTV has never worked reliably. Google owns both Chrome and YouTube, and they want you using their apps.

1 Like

I had issues with authenticating on NBC. It works for about 5 minutes then it gets hosed. Then Chrome issues with unsupported browser etc. I then just gave up on it with YTTV.

I tried adding these to lines 44 of main.js, the arguments for launching chrome. These alone didn't seem to make a difference, and checking chrome://gpu showed no hardware acceleration.

'--enable-unsafe-webgpu',
          '--enable-accelerated-video-decode',
	 	  '--enable-accelerated-video-encode',
          '--disable-notifications',
          '--no-first-run',
          '--disable-infobars',
          '--no-sandbox',
          '--use-gl=egl',
          '--in-process-gpu',
          '--hide-crash-restore-bubble',
          '--disable-blink-features=AutomationControlled',
          '--hide-scrollbars',
          '--enable-features=VaapiVideoEncoder,VaapiVideoDecoder,webgpu,video_encode,gpu_compositing',
          '--ignore-gpu-blocklist',
          '--disable-features=UseChromeOSDirectVideoDecoder'

Eventually I added all of these flags above and got chrome://gpu to show 'hardware acceleration' for video and audio. Unfortionately, it did not to seem to improve stopping or stuttering of the stream.

It did, however, greatly reduce the amount of CPU that was being used by the cc4c container. I was seeing roughly 20% CPU on my small Core i7 platform while watching a cc4c stream but applying the above code saw CPU usage to drop to nearly nothing. intel_cpu_top didn't seem to register a difference but I swapped the code back and forth to verify.

Interestingly, weatherscan didn't seem to work correctly with the above but windy and other video streams were fine.

1 Like

anyone notice NBC has gotten very bad with the stops etc....Been working fine till recently BUT now it stops all the time (nbc syfy usa etc) any ideas Running it all on a dedicated win10 pc 48gig ram etc tried both software and hardware exceleration no change

I'm only able to use the NBC direct links as Fios does not allow any other way.

Side note had to relogin to MTV Paramount TV Land CC CMT only after a month of logging in BUT not a big deal

Why not record NBC via a HDHomeRun Prime? That works great with FIOS.

I dont have an HD Prime

I've had a similar experience streaming on FIOS. I do not have a dedicated system, it's sharing its time with Homebridge, Frigate, Channels DVR, and a bunch of other small things. CPU hovers around 50% when streaming and recording with a lot of stutter.

It seems like watching live is better than recording and streaming, so I was thinking of trying to get a dedicated system. Might not make a big difference.

@masteryoda305, Do you have a separate GPU in the current system? I found that even a modest GPU will offload quite a bit from the CPU. My dedicated system has an old GTX1050 in it. And, while it is not absolutely perfect, there is very little stutter.

1 Like

No, it's an intel Integrated Graphics Intel HD Graphics 530 via the Linux Docker Container.

When I monitor intel_gpu_top after going through all the steps I put in above, I see IMC reads/writes go up but I do not see the busy%s go up for the various engines.

The big remaining feature I can't get to work is gpu_compositing, which I believe is why weatherscan is not rendering correctly.

1 Like

Ah, gotcha. I never used the Docker solution for CC4C. For me it runs natively on an old i7-8700/GTX-1050 PC, running Win 11 Pro.

Ive been running CC4C on a dedicated I5-8500 3.03hz running 48 gig ram and a 490gb m.2 ssd Onboard graphics Mayne ill look for a low profile card an see if it helps etc Its in a HP SFF desktop

did you ever have any luck with the Raspberry PI?