BETA: Chrome Capture for Channels

Seems happy as ever to me. I did have to launch a station in Channels, let it fail, manually open NBC in the browser, and then close out, but after that it was working fine. Might have been some hangup from the Chrome version upgrade or just that I haven't used it in a while. But the stations I tried (including local NBC) all launched and played in the client after that.

DRM can't affect this; that is the whole point. This is basically a screen capture technique.

@GTFan, have same issue too. Are you using the Docker container or using chrome browser 114? I have both that and a separate Windows machine running cc4c and only my Docker container gets the same error. The container uses Chrome 114 and I wonder if the network are blocking that old of browser now. My windows box has chrome 121 now.

Yeah I think that was it, somehow Chrome manages to update itself on Windows even though I disabled the update services and the scheduled tasks. I restarted the Chrome 114 instance that was running for capture and it updated to 121 at that point and started working again. As long as a new chrome update doesn't break capture again I'm okay with that I guess.

After a couple of failures the docker container is doing this:

/home/chrome/node_modules/@puppeteer/browsers/lib/cjs/launch.js:259
                reject(new Error([
                       ^

Error: Failed to launch the browser process! undefined
[16:16:0131/132820.967404:ERROR:ozone_platform_x11.cc(239)] Missing X server or $DISPLAY
[16:16:0131/132820.971474:ERROR:env.cc(255)] The platform failed to initialize.  Exiting.
[16:38:0131/132821.034069:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory


TROUBLESHOOTING: https://pptr.dev/troubleshooting

    at ChildProcess.onClose (/home/chrome/node_modules/@puppeteer/browsers/lib/cjs/launch.js:259:24)
    at ChildProcess.emit (node:events:525:35)
    at ChildProcess._handle.onexit (node:internal/child_process:291:12)

Node.js v18.16.0

I have to rm the container and build a new one. Am I doing something wrong with the container setup?

This is how I'm running it:

sudo docker run -d --name chrome-capture --restart=always -p 5589:5589 fancybits/chrome-capture-for-channels

I'm not looking for a dissertation on how to use Docker, but any pointers on additional parameters (like a volume mapping?) would be appreciated. I've now seen this behavior in both Unraid's Docker and two standalone Docker installs. Not saying it's not something I'm doing wrong!

Is anyone else using this for full time streaming? I imagine most are using it for watching a show or a game. Maybe something is accumulating and causing the container to fail after a day of constant streaming?

1 Like

Not sure how long these will last BUT so far so good
added the channel logos manually and moved them to the channels old location in my custom favorites list
All running on a simple Win10 I5 Gen9 cpu and 48gig ram and dedicated to channels
only NBC still hiccups BUT ill live...lol

#EXTINF:-1 channel-id="TVLand",TVLand
chrome://localhost:5589/stream?url=https://www.tvland.com/live-tv/38zm7e

#EXTINF:-1 channel-id="CMT",CMT
chrome://localhost:5589/stream?url=https://www.cmt.com/live-tv/g49ouk

#EXTINF:-1 channel-id="LogoTV",LogoTV
chrome://localhost:5589/stream?url=https://www.logotv.com/live-tv/9tzdvs

#EXTINF:-1 channel-id="MTV",MTV
chrome://localhost:5589/stream?url=https://www.mtv.com/live-tv/xzq4o4

#EXTINF:-1 channel-id="CCentral",CCentral
chrome://localhost:5589/stream?url=https://www.cc.com/live-tv/77hs5c

#EXTINF:-1 channel-id="VH1",VH1
chrome://localhost:5589/stream?url=https://www.vh1.com/live-tv/yfomrh

#EXTINF:-1 channel-id="Paramount",Paramount
chrome://localhost:5589/stream?url=https://www.paramountnetwork.com/live-tv/eb0kku

2 Likes

FYI, you can drop the ending on the lines and just end with the /live-tv part. Like this:

JP_ScreenShot_2024_02_02_09_08_49

It auto-forwards to wherever they want that to end up. Right now it is all the same links as you have above, but in the future, who knows?

For PBS:

2 Likes

Will try that next time i redo my CC4C list or add more missing channels.Wasn't sure if that end bit was tied to my login etc.
Must say having a solid dedicated PC makes the channels load nice a fast

Had this thread muted... it very long thread, so sorry if these been mentioned before...

Is there a single master list of urls / channels that this works with?
Or is it any url that has a video player in it?

Further testing of my problem and I'm fairly confident there's a problem with long streaming times using the Docker container. In short, I moved the process to an i5-8th gen, with an nvme for storage. After about 12 hours I get a read failure on the channel (error returned through Channels to the GoogleTV) for both my local Grafana dashboard and the ADS-B public website. I didn't time it, so I'm not sure it's exactly 12 hours, but it's pretty close and very consistent. All other content in Channels works fine.

I'm ok giving up on this as a 24/7 streaming option, but it would still be useful to know if I'm doing something wrong.

2 Likes

I just installed this using the setup guide. The video, even on the server side, stutters and freezes, unusable. I can't even get that weather channel to play smoothly. Am I doing something wrong or is my server just too old (1037U cpu with 8GB ram)? Thanks.

1 Like

Check the system utilization on the chrome.capture host.

It's how I found my laptop is too old.

This browser or app may not be secure. Learn more
Try using a different browser. If you’re already using a supported browser, you can try again to sign in.

This is really kicking my butt now. I am on a Mac Mini M2. All up to date. Change Main.js to remove "--disable-notifications"
Chrome is up to date.
Still same issue and at wits end. If anyone has insite it would be appreciated.
Also, does it always start up Chrome in incognito mode?

1 Like

How did you get it going in Unraid? VM?

Docker container. I started with a dedicated Proxmox VM running the container. I threw a lot of resources at it but couldn't get it to last without Channels losing the feed from CC4C. My last system I tested with was a standalone i7 7th gen with 16gb ram and a NVME for storage. Ubuntu 22.04 installed and nothing else aside from Docker. Both my Grafana dashboard (internal) and the ADS-B tracking website (external) threw a lost connection error after about 12 hours. Resource utilization on that system was relatively low. Chromium uses some CPU, but it still wasn't much, and the local NVME storage is as fast as it gets.

From my perspective it looks like the Docker container is the problem. I'm not enough of an expert in Docker telemetry to know what the root cause is. I'm not going to do this in Windows or MacOS for a variety of reasons, so that's not an option for me. Having this in native linux, instead of inside a container, would make it easier for me to troubleshoot.

1 Like

I can't get the process running on my Mac.

  1. I downloaded the executable (if I run it directly in terminal, can access the localhost in a browser).

  2. I created the plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>RunAtLoad</key>
    <true/>
    <key>KeepAlive</key>
    <true/>
    <key>Label</key>
    <string>com.getchannels.chrome.capture</string>
    <key>UserName</key>
    <string>********</string>
    <key>WorkingDirectory</key>
    <string>/Applications/ChromeCapture</string>
    <key>StandardOutPath</key>
    <string>/Applications/ChromeCapture/chromecapture.log</string>
    <key>StandardErrorPath</key>
    <string>/Applications/ChromeCapture/chromecapture.log</string>
    <key>ProgramArguments</key>
    <array>
      <string>/opt/homebrew/bin/node</string>
      <string>/Applications/ChromeCapture/main.js</string>
    </array>
</dict>
</plist>
  1. I start the process:
    launchctl load ~/Library/LaunchAgents/com.getchannels.chrome.capture.plist

Then nothing loads on the localhost.
If I check if it's running via launchctl list I get:

-	78	com.getchannels.chrome.capture

-	78	com.google.Chrome.framework.service_process/Users/********/Library/Application_Support/Google/Chrome

From reading online, this is an exit code 78 saying the process doesn't continue to run.

Any suggestions on what I'm doing wrong?
The log file is created but it is blank. I don't see any main.js file created in my directory, not sure if that's a cause of the problem or a symptom if it not running properly?

Edit: Could the problem be in the way I'm creating the plist file? I just duplicated another file in the folder and renamed it and copy/pasted the code in.

Edit2: Everything works perfectly if I just run the executable directly. It seems the plist is the problem.

Thanks!

1 Like

Alright I've been tinkering around with this more.

My CDVR server is running on a Zotac Zbox BI320 with Intel Celeron 2957U.

Running the chrome capture server on my Dell XPS 15 9560 with a i5-7300hq is very choppy and unwatchable.

Moving onto a M2 MacBook Air, seems to run fine with a stutter every now and then. I need to figure out how to change the starting window size however.

I then tried it on a new computer I built using an AMD 7700X CPU. Seems the same as the MacBook Air (stutters every now and then, but rare), however the window always starts maximized.

I am wondering if the old computer running the CDVR server is the reason why I am seeing stutters on the newer hardware. I never notified it with other custom channels or TVE.

For what it's worth, I'm running this on an M1 Mac Mini with 8GB RAM and it's been working really well. I rarely have stutters. How is your internal home network? One other thing I did was to make sure absolutely nothing else was running on the Mac. I just have the HDMI deadhead plugged in and I'm able to remote into the Mac Mini to adjust settings or update as needed.