BETA: Chrome Capture for Channels

What platform are you using while running the build process?

npm run build is the command you are looking for, but your development environment might need so additional configuration.

This is what is being used to generate the standalone apps. Maybe the docs might help?

In my testing all three executables compile correctly in macOS.

$ npm run build

> [email protected] build chrome-capture-for-channels
> pkg .

> [email protected]
> Fetching base Node.js binaries to PKG_CACHE_PATH
  fetched-v18.5.0-macos-arm64         [====================] 100%

  fetched-v18.5.0-macos-x64           [====================] 100%

  fetched-v18.5.0-win-x64             [====================] 100%
$ ls -l dist
chrome-capture-for-channels-macos-arm64
chrome-capture-for-channels-macos-x64
chrome-capture-for-channels-win-x64.exe

Most of the code in script/build is related to signing the mac executables so they can run without security warnings.

1 Like

When I tried to run this in Windows all I got was the Mac exe in dist and I think that's what others are seeing.

Here's what I get when I run 'npm run build':


> [email protected] build
> pkg .

> [email protected]
> Fetching base Node.js binaries to PKG_CACHE_PATH
  fetched-v18.5.0-macos-arm64         [====================] 100%

  fetched-v18.5.0-win-arm64           [====================] 100%

  fetched-v18.5.0-macos-x64           [====================] 100%

  fetched-v18.5.0-win-x64             [====================] 100%

node:internal/child_process:421
    throw errnoException(err, 'spawn');
    ^

Error: spawn UNKNOWN
    at ChildProcess.spawn (node:internal/child_process:421:11)
    at spawn (node:child_process:759:9)
    at fabricate (C:\Users\David\Downloads\chrome-capture-for-channels\node_modules\pkg\lib-es5\fabricator.js:55:51)
    at fabricateTwice (C:\Users\David\Downloads\chrome-capture-for-channels\node_modules\pkg\lib-es5\fabricator.js:120:5)
    at MultiStream._queue (C:\Users\David\Downloads\chrome-capture-for-channels\node_modules\pkg\lib-es5\producer.js:271:68)
    at MultiStream._next (C:\Users\David\Downloads\chrome-capture-for-channels\node_modules\multistream\index.js:86:12)
    at Meter.onEnd (C:\Users\David\Downloads\chrome-capture-for-channels\node_modules\multistream\index.js:129:12)
    at Object.onceWrapper (node:events:628:28)
    at Meter.emit (node:events:514:28)
    at endReadableNT (node:internal/streams/readable:1376:12) {
  errno: -4094,
  code: 'UNKNOWN',
  syscall: 'spawn'
}

Node.js v20.5.0

Looks like an internal error here, can't find 'spawn' in the main chrome capture files. And then all you get is the Mac exe.

You can try pkg -d . in the project directory to run the pkg build process directly in debug mode. It will have a ton of output, but maybe something there will be helpful in identifying the issue?

Should work with JF. This is interesting...

1 Like

After about a month or so of using this, things are working quite well. I was able to fix the resolution issue.

I watch MSNBC while I am working sometimes, and it has the same issue where the video freezes but the audio keeps playing. This is definitely a NBCU problem.

My only outstanding issue is figuring out the guide code for E! West. Has anyone been able to map that one to guide data?

Thank you again for this wonderful work around.

2 Likes

tvc-guide-stationid="91579" tvg-name="EPHD"

1 Like

That did it. Thank you!

I have just begun experimenting with this WONDERFUL tool, and I've got a strange issue.

It was working for a bit earlier today, but now whenever I try and watch a channel, chrome pops up, goes away, and I get this error:

➜  bin ./chrome-capture-for-channels-macos-arm64
[2023/08/02 13:03:50.745] Chrome Capture server listening on port 5589
[2023/08/02 14:18:24.259] streaming https://tv.youtube.com/watch/iEPyZbjMcSE
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "undefined".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

Node.js v18.5.0

Well, I gave up running it on the Mac, and moved it over to windows, and it seems to be OK, but the recordings seem pretty janky, corrupted, and don't play back well.

(I've tried HLS and MPEG-TS)
Any tips on that?

1 Like

Well I got a 4k HDMI dummy plug from Amazon and I'm still seeing black borders even after reboot, so I'm at a loss as to what to do. This is one of those Beelink Ryzen 7 5800H mini PCs, it has display port and HDMI connectors. You can't see or change any display settings with RDP and I don't have a display port monitor. Help?

EDIT: nvm, figured it out - had to install TightVNC server and remote in w/VNC instead of RDP so I could change the dummy plug display to 2560x1440. Borders gone!

1 Like

The viewport aspect ratio needs to be more like 16x10 instead of 16x9. Has to be edited in the main.js file. Or if you're running the executable you can just resize the window manually.

1 Like

Setup Chrome Remote access.
Then you can change the display settings.

Is there a way to get this working on a serving running on android tv?

I tried this in macOS and had the same problem.
Clearly we are missing something.

1 Like

@johnofcamas What hardware are you running, on the Windows setup?

Ummmm... I guess it would be technically possible, but, honestly, I can only see all the ways it might go wrong and be beyond frustrating. But if you feel like being the guinea pig, I'd say your best bet is to get Docker installed on your device and then follow the normal directions above.

It loads then I get this message how do I fix it I included a screenshot, I have register with NBC live.

Select Yes and at the login promt, input your credentials in the Chrome Capture window. This is not the usual Chrome Browser. A pop up should appear at the Top Right asking to save login, Click yes. Once you login it will not show again.

2 Likes

Do what @kennyb3653 said. If you are having difficulties interacting, be sure you are following the direction in Step 5, Part 4, Bullet Point 1. It is very specific as to what to do with Docker.

If you have certain special characters in your password (see Step 8, Bullet Point 5), then follow what @bnhf is working on above:

Others have also given other ways to interact with the Docker, too, if you want to try those, but this one seems the best approach in my estimation.

2 Likes

So now that I have everything working on the Beelink pc, the pic looks way better. But I noticed in show stats that it's only doing 1080p at 30fps even though min is set to 60, anyone else seeing this? This is with integrated Ryzen 7 graphics doing encode I'm guessing.

Not really a complaint because I can certainly live with the quality, just curious.

1 Like