You can modify the bat file to work with main.js
I tried that too but got the same results. I also tried having task scheduler fire it up when my computer would first log on and same thingā¦errors, plus the fact that I couldnāt get the command line window to open minimized as well.
I have a powershell script setup to launch main.js and there is a task on task scheduler set to do this when the computer first logs in. With the exception of the having to hit play twice when starting a channel, this process is pretty flawless for me so I think Iām just gonna stick with it. But thanks again for offering plenty of tips and suggestions
I think you just need to make yours headless I have no issue with it closing after channel is done. It opens a new chrome instance which is headed I assume that's what you mean
Hard to say, maybe so, but like I said I was running into a boat load of other issues too between error messages when the cmd window would pop up, and then eventually wouldnāt even get that far, I just got windows syntax errors. And as I said too, when the .bat file fired up, the cmd window that loads would not minimize. I wanted this hidden/minimized and I couldnāt get it to. Iāve fiddled with it enough now I donāt want to risk screwing something else up. Just gonna stick with whatās already working well. But thank you so much again!
Has anyone with 12+ threads tried 2+ streams at once? Like NBC or Peacock or Youtube TV 1080p? I kind of wish I bought a Xeon, I wonder how something like 30 threads would handle this. It would be a lot cheaper than having 2-5 hdmi capture devices.
I assume 3-5 streams at once would be possible with no lag with a very powerful cpu like powerful xeon, thread ripper or new i9
I have a 12700k I use quick sync. When I get back home I'll try 3 streams.
I am running a Mac Mini M1 and I can record two streams at once from NBC and using YTTV dot com. I am not using the TVE as I am not able to authenticate with gmail for my account during the set up. (I know this is a google issue with my account)
Wow thats unfortunate.
Nice 20 threads, it should be able to handle 3, try nbc channels.
ok so i was able to run 3 streams, cpu was around 30% and gpu around 60% the streams definitely stuttered to start and took a good 20 seconds or so to smooth out. another issue i noticed is that it wouldn't tune to the bravo channels very well. kept playing nbc news now instead.
edit - this may have been a client issue. i originally tried this on a chromecast hd and 2 chrome tabs, however, running 2 streams on 2 phones i had 0 issues. cpu was closer to 15% and gpu around 55%.
edit2 - i am commenting out await browser.close() killing 1 stream kills them all. i should have seen this coming lol.
edit3 - i found a bug. when i started testing i used the stream url method instead of using the built in stream urls. the request.params.url object is parsing the additional query params off the url resulting in url="https://www.nbc.com/live?brand=bravo" and then you get another param for callsign="bravo_west".
There are a few things you can do to optimize pc. Did you increase pagefile? 16-32gb ram? Did you use my optimized script? Real test is to watch for 15 min to see if it stutters
i have 32GB of ram. not touching page files. just used the regular script. there is a bug in cc4c when parsing url's passed in vs. urls defined in the script. i just found out.
Chrome Capture server listening on port 5589
C:\Windows\System32\chrome-capture-for-channels\node_modules\puppeteer-core\lib\cjs\puppeteer\cdp\LifecycleWatcher.js:103
this.#terminationDeferred.resolve(new Error('Navigating frame was detached'));
^
Error: Navigating frame was detached
at #onFrameDetached (C:\Windows\System32\chrome-capture-for-channels\node_modules\puppeteer-core\lib\cjs\puppeteer\cdp\LifecycleWatcher.js:103:47)
at C:\Windows\System32\chrome-capture-for-channels\node_modules\puppeteer-core\lib\cjs\third_party\mitt\mitt.js:62:7 at Array.map ()
at Object.emit (C:\Windows\System32\chrome-capture-for-channels\node_modules\puppeteer-core\lib\cjs\third_party\mitt\mitt.js:61:20)
at CdpFrame.emit (C:\Windows\System32\chrome-capture-for-channels\node_modules\puppeteer-core\lib\cjs\puppeteer\common\EventEmitter.js:83:23)
at #removeFramesRecursively (C:\Windows\System32\chrome-capture-for-channels\node_modules\puppeteer-core\lib\cjs\puppeteer\cdp\FrameManager.js:451:15)
at #onClientDisconnect (C:\Windows\System32\chrome-capture-for-channels\node_modules\puppeteer-core\lib\cjs\puppeteer\cdp\FrameManager.js:94:42)
Node.js v23.0.0
What is this error?
Tell us about your setup. What js and node etc. did you try to install node and reinstall?
I'm using your files and setup everything new? Your bat file is giving me that error? when I run just the js it works?
I will look at it
Does anyone have the correct format for the text m3u input for Hulu?
Is there a way I can make the macOS executable (chrome-capture-for-channels-macos-arm64) do its work headless without the user logged in?
I have the same thing happening to me. Clean install of everything (operating system, node, and all node modules).
I've tried with Google Chrome versions 129.0.6668.101, 130.0.6723.117, and 131.0.6778.70. Same results on all of them. Full clean installations each time
[2024/11/15 15:04:50.300] Chrome Capture server listening on port 5589
[2024/11/15 15:04:50.418] No channel specified in the URL.
[2024/11/15 15:04:50.418] 0 0
[2024/11/15 15:04:51.013] No channel specified in the URL.
[2024/11/15 15:04:51.017] 0 0
[2024/11/15 15:04:51.196] 0 0
[2024/11/15 15:04:51.215] failed to start browser page https://www.nbc.com/live?brand=msnbc Error: Failed to launch the browser process!
TROUBLESHOOTING: https://pptr.dev/troubleshooting
at ChildProcess.onClose (C:\Users\Khaos\node_modules\@puppeteer\browsers\lib\cjs\launch.js:314:24)
at ChildProcess.emit (node:events:519:35)
at ChildProcess._handle.onexit (node:internal/child_process:294:12)
[2024/11/15 15:04:51.223] GET /stream?url=https://www.nbc.com/live?brand=msnbc&callsign=msnbc from ::ffff:192.168.0.10 responded 500 in 206.248 ms
[2024/11/15 15:04:51.237] Settings for URL http://www.google.com: Bitrate: 5940000, Audio: 192000, Frame Rate: 30
C:\Users\Khaos\node_modules\puppeteer-core\lib\cjs\puppeteer\cdp\LifecycleWatcher.js:103
this.#terminationDeferred.resolve(new Error('Navigating frame was detached'));
^
Error: Navigating frame was detached
at #onFrameDetached (C:\Users\Khaos\node_modules\puppeteer-core\lib\cjs\puppeteer\cdp\LifecycleWatcher.js:103:47)
at C:\Users\Khaos\node_modules\puppeteer-core\lib\cjs\third_party\mitt\mitt.js:62:7
at Array.map (<anonymous>)
at Object.emit (C:\Users\Khaos\node_modules\puppeteer-core\lib\cjs\third_party\mitt\mitt.js:61:20)
at CdpFrame.emit (C:\Users\Khaos\node_modules\puppeteer-core\lib\cjs\puppeteer\common\EventEmitter.js:83:23)
at #removeFramesRecursively (C:\Users\Khaos\node_modules\puppeteer-core\lib\cjs\puppeteer\cdp\FrameManager.js:451:15)
at #onClientDisconnect (C:\Users\Khaos\node_modules\puppeteer-core\lib\cjs\puppeteer\cdp\FrameManager.js:94:42)
Node.js v23.2.0
[2024/11/15 14:54:30.304] Chrome Capture server listening on port 5589
[2024/11/15 14:54:30.406] No channel specified in the URL.
[2024/11/15 14:54:30.407] 0 0
[2024/11/15 14:54:30.798] No channel specified in the URL.
[2024/11/15 14:54:30.798] 0 0
[2024/11/15 14:54:30.975] failed to start browser page https://www.nbc.com/live?brand=msnbc Error: Failed to launch the browser process!
TROUBLESHOOTING: https://pptr.dev/troubleshooting
at ChildProcess.onClose (C:\Users\Khaos\node_modules\@puppeteer\browsers\lib\cjs\launch.js:314:24)
at ChildProcess.emit (node:events:519:35)
at ChildProcess._handle.onexit (node:internal/child_process:294:12)
[2024/11/15 14:54:30.980] GET /stream?url=https://www.nbc.com/live?brand=msnbc&callsign=msnbc from ::ffff:192.168.0.10 responded 500 in 180.403 ms
[2024/11/15 14:54:31.046] No channel specified in the URL.
[2024/11/15 14:54:31.047] 0 0
[2024/11/15 14:54:31.176] 0 0
[2024/11/15 14:54:31.180] Settings for URL http://www.google.com: Bitrate: 5940000, Audio: 192000, Frame Rate: 30
[2024/11/15 14:54:31.182] 0 0
[2024/11/15 14:54:31.183] Settings for URL https://www.nbc.com/live?brand=msnbc: Bitrate: 15400000, Audio: 192000, Frame Rate: 30
[2024/11/15 14:55:01.198] failed to start stream http://www.google.com TimeoutError: Timed out after waiting 30000ms
at C:\Users\Khaos\node_modules\puppeteer-core\lib\cjs\puppeteer\common\util.js:258:19
at C:\Users\Khaos\node_modules\puppeteer-core\lib\cjs\third_party\rxjs\rxjs.js:3986:35
at OperatorSubscriber2._this._next (C:\Users\Khaos\node_modules\puppeteer-core\lib\cjs\third_party\rxjs\rxjs.js:1055:13)
at Subscriber2.next (C:\Users\Khaos\node_modules\puppeteer-core\lib\cjs\third_party\rxjs\rxjs.js:678:16)
at AsyncAction2.<anonymous> (C:\Users\Khaos\node_modules\puppeteer-core\lib\cjs\third_party\rxjs\rxjs.js:4863:24)
at AsyncAction2._execute (C:\Users\Khaos\node_modules\puppeteer-core\lib\cjs\third_party\rxjs\rxjs.js:1974:16)
at AsyncAction2.execute (C:\Users\Khaos\node_modules\puppeteer-core\lib\cjs\third_party\rxjs\rxjs.js:1963:26)
at AsyncScheduler2.flush (C:\Users\Khaos\node_modules\puppeteer-core\lib\cjs\third_party\rxjs\rxjs.js:2235:30)
at listOnTimeout (node:internal/timers:614:17)
at process.processTimers (node:internal/timers:549:7) {
[cause]: undefined
}
I found a solution (or maybe a workaround?) for this.
First, run the original CC4C Node.js files (from the fancybits GitHub) using the provided instructions, close that, THEN run the updated version posted by doug8796 from the same directory.
That cleared up all of the errors and random issues I was encountering. I'll put my steps below. The first 6 steps are pulled directly from the fancybits GitHub page for CC4C:
winget install -e --id Git.Gitwinget install -e --id OpenJS.NodeJSgit clone https://github.com/fancybits/chrome-capture-for-channelscd chrome-capture-for-channelsnpm installnode main.js- Login to whatever service(s) you plan to use with CC4C.
- Close Chrome and the active node command windows.
- Download and unzip doug8796's updated version to the same chrome-capture-for-channels folder that git created.
- Run doug8796's updated version with the provided .bat file OR
node ncc-7-0.js
NOTE: If you use the bat file, add%~dp0as line 3 of that file for the sake of keeping everything in the working directory and allowing it to run as administrator (it shouldn't need to be run as admin, though) - Everything should now be working properly with doug8796's update
EDIT: Thank you to DaveTheNerd for catching a missing hyphen in my node command in step 10!