BETA: Chrome Capture for Channels

Anyone able to help with getting nvidia gpu support into the docker container would be helpful.?
It is now supposed to be supported natively in Docker Desktop but the GPU insrtuctions to add to docker-compose are beyond me.

1 Like

Are you using Mac or PC?

windows 11 Pro desktop pc I'm using an I7-8700 with 64gig ram, 2TB NVME ssd, 4TB RAID and an RTX-2070 as a media sever.

1 Like

refreshing the browser a few times with 115 seems to solve the "different browser" error.

I find that with a lower powered PC (which is mostly what I have for channels) results in choppy video when the cc4c docker is on the same little machine as these machines are underpowered for this purpose. Running the identical cc4c docker on an 8-core i7 I use as a workstation results in very smooth video back on my channels server - I think cc4c is recognized as having a way higher resource requirement than the other "projects" and CDVR itself.

I think you have to check your specs and reset expectations on what cc4c (indeed as clever as it is) is going to accomplish for you in the short term without a hardware upgrade in some form.

I mentioned this too. My low power mini pc didn't cut it.

Testing on this is limited, but I've been playing around with a new Docker Compose that will support use of the fancybits container with environment variables to set the video and audio bitrates. It's working well for me, so it'd be great if a few of you could try it out too:

version: '3.9'
services:
  chrome-capture-for-channels:
    image: fancybits/chrome-capture-for-channels:latest
    container_name: cc4channels
    command:
      - sh 
      - -c 
      - |
        Xvfb :99 -screen 0 1920x1080x16 &
        x11vnc -display :99 -forever &
        sed -i '/videoBitsPerSecond/c\        videoBitsPerSecond: process.env.VIDEO,' main.js;
        sed -i '/audioBitsPerSecond/c\        audioBitsPerSecond: process.env.AUDIO,' main.js;
        exec node main.js
    #devices:
      #- /dev/dri:/dev/dri # Uncomment for Intel Quick Sync (GPU) access
    ports:
      - 5589:5589 # cc4channels proxy port
      - 5900:5900 # VNC port for entering credentials
    environment:
      - VIDEO=${VIDEO}
      - AUDIO=${AUDIO}
      - TZ=${TZ} # Add your timezone in the Environment variables section with "name" set to TZ and "value" to your local timezone
    volumes:
      - cc4channels:/home/chrome # Creates persistent Docker Volume in /var/lib/docker/volumes for Chrome data and main.js
    restart: unless-stopped
volumes:
  cc4channels:

Environment variables are set at the bottom of your Portainer-Stack, in the area marked for them. You'll want to set these three:

2 Likes

Sounds like a beast! :grinning:

Well said…

unless I did something wrong I'm not getting any changes and in the logs the first 2 lines:
2023-07-30 19:31:40 sed: -e expression #1, char 21: unknown command: \' 2023-07-30 19:31:40 sed: -e expression #1, char 21: unknown command: '
this 3rd line is in the other container logs but just fyi
2023-07-30 19:31:40 _XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
2

Not working for me now either. :frowning: I'm away for a couple of days so I'll take a fresh look at this mid-week. In the meantime, use the previous compose and edit the main.js. Wouldn't be the "playground" without a few scraped knees.

2 Likes

Back up and running the previous looking great so far.
I was able to record and watch Nascar this afternoon on USA no problems.
any thoughts if gpu support can work for nvidea?
does Intel Quick Sync actually work?? not that i can use it.
Thank you for playing!

quicksync wasn't working for me even with the flag set. i think i was missing something else.

Following up to see if anyone is able to change from opus audio to something like aac? Also any way to just have stereo? It appears to be capturing as multichannel audio.

I had to change my N5095 *ix server's mini compose yaml to in order to get it to start cleanly.

devices:
# VAAPI Devices
- /dev/dri/renderD128:/dev/dri/renderD128
- /dev/dri/card0:/dev/dri/card0

But I do not see any gpu activity on intel_gpu_top as there is no transcoding going on. Not sure if it would be used anyway by the current tasks.

that's interesting because the standalone windows exe definitely uses chromes hw acceleration...

So what exactly is the workaround to get full screen video without borders without an HDMI monitor emulator? Is it even possible?

I don't have a monitor hooked to my current setup and I can see that the viewport's wrong so I'm guessing there's no way to fix it without the ability to set resolution higher than 1080p.

Running CC4C on a system with greater than 1080p should eliminate the black bars. At least it has for a lot of people. You don't need the HDMI dongle, however it is an inexpensive way to go if you don't have larger monitor. And, it's absolutely needed if you plan to run the system headless. Whatever your setup, make sure the CC4C window is opening on the monitor that is greater than 1080p, virtual or otherwise.

if you are saying you don't have a monitor nor a dummy plug then I am not sure. if you have a dummy plug you have to change the viewport in the main.js file. someone above suggested 1920x1200.

You can also try setting up virtual monitors. See posts #462 amd #464.

So I have the development environment set up and have been running "node main.js" to get this running. I find the video quality peaks around 9500.

How do I make an exe for windows?
I tried "npm run build" and it seems to make a file for mac or arm...or something.

Thanks!