BETA: Chrome Capture for Channels

You can shorten the URL by replacing the Title with the Channel name that is how I use it in ADBTuner

Example ...

https://www.xfinity.com/stream/live/HBOHW/5232923399725817105/HBOHW

Fantastic! Thanks.

Has anyone tried running Chrome in kiosk mode ? to Capture ? I currently do not use Chrome Capture but looking into it.

Example ...

"C:\Program Files\Google\Chrome\Application\chrome.exe" -kiosk -fullscreen https://www.xfinity.com/stream/live/HBOHW/5232923399725817105/HBOHW

How do I enable the uBlock Origin extension when this runs? I commented out the disable extensions options in args but it still only loads video capture and nothing else.

I finally "fixed" my stuttering issue using the portainer method by changing main.js to encode at 1280x720 instead of 1920x1080. For now, that's alright as the sources I'm recording are already that resolution anyway. I'm curious what CPUs you all using to get smooth encoding at 19220x1080. I'm using a Ryzon 9 5950X and 5900X. Are you all using Intel CPU with builtin graphics?

1 Like

And you aren't getting black bars doing this?

@babsonnexus:
And you aren't getting black bars doing this?

No black bars at all. Everything lokks perfect.

2 Likes

Hi, I am trying to pass the stream url (https://watch.foxtel.com.au/app/#/live/cnn)
but it seems from the log that only https://watch.foxtel.com.au/app is passed to Chrome capture which takes it to a browse page instead of the direct stream

2023/11/17 23:02:36.276] GET /stream/?url=https://watch.foxtel.com.au/app/ from ::1 responded 200 in 140.344 ms
[2023/11/17 23:02:36.283] finished https://watch.foxtel.com.au/app/
[2023/11/17 23:02:49.030] streaming https://watch.foxtel.com.au/app/
[2023/11/17 23:03:19.252] failed to stream https://watch.foxtel.com.au/app/ TimeoutError: Waiting for selector `video` failed: Waiting failed: 30000ms exceeded
    at Timeout.<anonymous> (/snapshot/chrome-capture-for-channels/node_modules/puppeteer-core/lib/cjs/puppeteer/common/WaitTask.js:71:37)
    at listOnTimeout (node:internal/timers:564:17)
    at process.processTimers (node:internal/timers:507:7)

E: If I put the url in a shortner, it loads the correct url. I am assuming it is the # that is ignoring the remainder.

The other issue I am running into is when I change channels, is the shot below. Is anyone else experiencing this ? Chrome doesn't seem to have more than one tab open on their page.

If I wait long enough, it eventually loads the next channel

1 Like

I think I may have gotten around the # by writing it as %23 maybe, can’t really remember now.

But like I said in the other forum, I got stuck on that error message too. Hopefully have some more luck than me.

1 Like

Check in the file node_modules/pupeteer-stream/dist/PuppeteerStream.js, in my file it was line 75 but could vary if you have a different version.

See:

Hi all,
I'm trying to get CC4C working in a Docker container (using Portainer) in Ubuntu 22.04, but for some reason Chrome doesn't start up even though it Chrome runs fine when I just open it up. My Channels server is on a different Windows machine and I can run CC4C on it, but I'd like to see if I can put it on a different machine to save some resources. Below is the log from Portainer, can anyone give me some idea as to where I might look next? Thanks.

_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
[2023/11/19 00:43:17.724] Chrome Capture server listening on port 5589
[2023/11/19 00:43:37.882] streaming Spectrum TV
[2023/11/19 00:44:10.854] failed to stream Spectrum TV TimeoutError: Waiting for selector video failed: Waiting failed: 30000ms exceeded

  • at Timeout. (/home/chrome/node_modules/puppeteer-core/lib/cjs/puppeteer/common/WaitTask.js:71:37)*
  • at listOnTimeout (node:internal/timers:569:17)*
  • at process.processTimers (node:internal/timers:512:7)*
    [2023/11/19 00:44:31.940] GET /stream?url=https://watch.spectrum.net/livetv?tmsid=74030 from ::ffff:192.168.88.240 responded 200 in 2353.183 ms
    [2023/11/19 00:44:32.030] finished Spectrum TV

Edit: So I was able to clear up the first error regarding the .X11 directory. I had to add "-nolisten unix" to the docker command line. Still working on getting Chrome to show up though.

Has anyone got nvidia gpu to work in docker. My container shows I have access to the card shows up with nvidia-smi.

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

Have the this in main.js file. When I check chrome://gpu it shows using software not hardware.

rrlucero,

Do you have the Nvidia Container Toolkit installed? This seems like a pretty good instuctional link on how to get the gpu working in docker, https://www.howtogeek.com/devops/how-to-use-an-nvidia-gpu-with-docker-containers.

Thank you. Yes ofcourse HTML Coding.

I am getting some good results with sky sports with one hurdle. When the stream opens it pops up a choice from Start or from Live. It seems Chrome is automatically executing Enter or the default action which is triggering the event from the Start.

Is there a way for me to make it 'click' from Live by feeding actions 'Right' then 'Enter'
Running the native macOS version of CC

Thank you for the response. Yes i have that installed. I have the card working with channels-dvr as well as emby and other dockers. Just for some reason I can't get it to work with the cc4channels docker. The container has access to the card just chrome doesn't use it.

There is a setting in Chrome to enable the GPU. Away from my PC so I can’t provide more info.

rrlucero,

Are you using Docker for Windows or Linux? Headless? With Portainer or not? I'm asking because I can't figure out how to edit main.js in my docker container and there are a lot of arguments for Chrome I'd like to try which might enable hw acceleration. Some of them are; --use-gl=angle \ --use-angle=gl-egl --use-cmd-decoder=passthrough \

1 Like

I am headless. I using windows but launch main.js which I did edit.

I am running docker on Linux (omv6). I have it in docker with portainer, as well as second docker container with omv6 docker compose plugin. As far as editing the main.js file I just used nano. After editing it I had to delete the stack and the redeploy. The file doesn't get erased as long as you don't delete the volume. If I just stop the container and restart it it stops working.