Chrome Capture for Channels

Unfortunately, this didn’t work for me. Still seeing Borders. Had to go back to a resolution above 1920. Using a MacBook Pro…

Thanks for putting this together! I was unable to get this to work prior to this and now it works flawlessly!

Can someone verify whether or not this method supports captions? Either as captions that can be enabled in the Channels interface or that can be enabled in the browser and are overlayed/“burned” onto the video?

[EDIT]: Setting up as a service seems fairly unstable. works for a bit, but then stops after a few minutes.
[EDIT2]: The whole thing seems a bit stuttery for me. I have tried on 2 different PC's as tests (the latest being an i9 PC), and keep getting freezes in the streams. Not sure why. In all fairness, it appears to freeze in the Chrome window, so I don't think it is the capturing of the tab that is at fault.

I have set this up as a Windows service using NSSM, and it semems to work well. I had to run it first as 'not a' service so I could log into the provider using my YTTV credentials. Then when I set the service up with NSSM I had to have it log in as my user (again, for YTTV credentials), but it seems to work. The nice thing is that the Chrome window doesn't pop up, it is completely hidden.

I have also tried to set up the CW, with limited success:

#EXTINF:-1 channel-id="CW",CW
chrome://localhost:5589/stream?url=https://www.cwtv.com/

The above isn't just the video, it ends up with other things as well. Has anyone gotten the CW to work?

Lastly, is it possible to get CC working?

I am able to enable captions for SOME channels in the chrome browser. It appears to be dependent on the source. I can enable CC on channels I am streaming from YTTV but not on NBS News. I'm not saying it can't be done, just that if it can, I haven't figured out how to do it.

The CW channel doesn’t support TVE or have a Live feed via the web…

How did you log in with the browser hidden?
I have tried this and there was no way for me to interact with the browser to enter credentials.
What am I missing?

Thanks!

As I mentioned, I had to run the service as a user. Then it just worked. So basically, I have a user account on the PC, logged in and authenticated normally. Then I used NSSM to create the service running as that same user. (technically, I created the service, then I used services.msc to change it to logon with a user account.)

BUT, like I said, it seems to only work for a short amount of time. Maybe you will have better luck than I did.

doh...
not sure why I didn't think to run as the same user.
yeah, it doesn't work great.
Seems to work the best into a dummy monitor.

Thanks!

Thank you for sending this! This is what I was looking for, can't believe I missed it. I am still having issues and will do my best to describe them:

  1. I am using a 2011 iMac as my Channels server running High Sierra 10.13.6. When I run the chrome capture for channels program from GitHub it comes back with this. Does this mean my Mac is too old for this?
dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
  Referenced from: /Users/channelsimac/Desktop/chrome-capture-for-channels-macos-x64 (which was built for Mac OS X 10.15)
  Expected in: /usr/lib/libSystem.B.dylib

Thats what I assumed, so I wen't to a different iMac in the house which is running the latest MacOS, and ran the program and Chrome on there and it seems to behave better since it says:

[2023/07/09 10:14:41.541] Chrome Capture server listening on port 5589

I thought I read somewhere in one of these threads, that you can use a different computer from the DVR server for Chrome Capture. All you have to do is replace LocalHost with the IP of the other computer on your network, so here is what my custom channels look like:

#EXTM3U

#EXTINF:-1 channel-id="MSNBC",MSNBC
chrome://192.168.86.22:5589/stream/msnbc

#EXTINF:-1 channel-id="NBC Sports Philadelphia",NBC Sports Philadelphia
chrome://192.168.86.22:5589/stream/nbcsphiladelphia

When I attempt to launch the channel from my phone, the Channels App says The Channels DVR Server had a problem. Press play to try again. (Transcoder)

The Crome Capture app reports the following:

[2023/07/09 10:18:17.825] failed to start browser page https://www.nbc.com/live?brand=rsn-philadelphia&callsign=nbcsphiladelphia Error: An `executablePath` or `channel` must be specified for `puppeteer-core`
    at assert (/snapshot/chrome-capture-for-channels/node_modules/puppeteer-core/lib/cjs/puppeteer/util/assert.js:28:15)
    at ChromeLauncher.computeLaunchArguments (/snapshot/chrome-capture-for-channels/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:96:36)
    at ChromeLauncher.launch (/snapshot/chrome-capture-for-channels/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:83:39)
    at ChromeLauncher.launch (/snapshot/chrome-capture-for-channels/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:51:22)
    at PuppeteerNode.launch (/snapshot/chrome-capture-for-channels/node_modules/puppeteer-core/lib/cjs/puppeteer/node/PuppeteerNode.js:151:105)
    at Object.launch (/snapshot/chrome-capture-for-channels/main.js)
    at /snapshot/chrome-capture-for-channels/node_modules/puppeteer-stream/dist/PuppeteerStream.js:83:34
    at Generator.next (<anonymous>)
    at /snapshot/chrome-capture-for-channels/node_modules/puppeteer-stream/dist/PuppeteerStream.js:31:71
    at new Promise (<anonymous>)
[2023/07/09 10:18:17.828] GET /stream/nbcsphiladelphia from ::ffff:192.168.86.220 responded 500 in 4.202 ms

I also failed to get the auto launch plist to work right, but for now I figured I would try and see if I can even get a channel to load first. I'll circle back to that if/when I can get the above figured out...

Your help so far as been greatly appreciated.

1 Like

I too am having issues with the auto loading of the plist. Plutil says it’s good, it loads with no error but it never starts the executable.

I'm on a Mac too, and don't use a plist for this. I just launch the executable directly.

You can also add it to your list of login items so it launches automatically.

1 Like

Looking at the stats for the Firestick - I am seeing a high number of dropped frames for CC4C output that I don't see elsewhere. Tried changing to HEVC for transcoding which improved slightly but still had output drops

1 Like

For anyone interested, this is the best headless adaptor I found.
Plugs into display port.
This will pass the HDCP test, most of what I tried do not.
Interestingly, Chrome Capture would work even if the dummy does not pass the HDCP test.
On at least one occasion I had fubo tell me I needed to disconnect my external monitor because it was not HDCP compliant. As usual, your mileage may vary.

https://www.amazon.com/dp/B0C2CP657Y?psc=1&smid=A14DBS7QJJM5C&ref_=chk_typ_imgToDp

1 Like

So far, I've noticed that watching the stream live works very well, but recordings are a hit or miss. In my case, the video always records, but not the audio. For the first few seconds of the recording, it sounds fine then it changes sounding compressed and at the wrong speed. This is during the same scene, not when a commercial comes on. VLC and Mediainfo both show the audio as Opus, but I think that's because they analyze from the beginning of the video where the audio is fine. Anyone else seeing this on recordings?

1 Like

I had several recordings over weekend, as well as, a daily MLB game. No real issues in recording or watching on a Channels client. I am using Fubo as a source, which for me, seem more stable than the NBC site.

I did have an issue on one of the recordings, I wanted to edit the commercials out and archive the file. But, I was greeted with an audio PID error when trying to open the file in VideoReDo. I had to use ffmpeg to remux, and then was able to edit it. Not sure if this is a Channels DVR issue, or something coming from the CC4C stream?

Thanks @sheepy, I'll try a remux as well to see if that clears up the audio. I used Spectrum as the source for this recording.

1 Like

FYI, when I used ffmpeg, I also converted the audio to aac.

Well thanks to @turtletank I started re-looking at Philo using the URLs and noticed that the feeds from Philo run at a significantly lower rate than YTTV or NBC and Philo feeds were hard to view.

NBC Feed:
Watching ch1465 from AppleTV (Remux Running at 1mbps: 20s @ 0.93x (40.90fps)): buf=0% drop=0%

YTTV Feeds:
Watching ch1465.01 from AppleTV (Remux Running at 917kbps: 16s @ 1.18x (78.86fps)): buf=0% drop=0%
Watching ch1493.01 from AppleTV (Remux Running at 903kbps: 12s @ 1.22x (81.22fps)): buf=0% drop=0%
Watching ch1493.01 from Web (Transcoder Running at 800kbps: 9s @ 1.21x (56.59fps)): buf=0% drop=0%

Philo Feed:
Watching ch1627 from AppleTV (Transcoder Running at 310kbps: 9s @ 0.74x (35.16fps)): buf=0% drop=0%
Watching ch1493 from AppleTV (Transcoder Running at 207kbps: 29s @ 0.96x (32.55fps)): buf=0% drop=0%
Watching ch1493 from Web (Transcoder Running at 315kbps: 23s @ 1.01x (28.45fps)): buf=0% drop=0%

CC4C and CDVR are both running on the same Windows 11 box so any thoughts or knobs that can be used to improve the performance of the Philo feeds?

Over the last few days this was working very well for me. Chrome updated and now it will not work. I can see the Chrome video capture page open, but then it closes and I get an error message on the Channels client.

The source is on a Mac and I am using chrome-capture-for-channels-macos-x64. After the error message on the client appears, it shows a problem with a "flag" but the page will not stay up long enough for me to jot it down. On terminal I get this message:

[2023/07/11 17:22:58.465] Chrome Capture server listening on port 5589
[2023/07/11 17:23:13.131] streaming https://tv.youtube.com/watch/toLh6iOl_Zk
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
logout

Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

Appreciate any help on how to fix the flag issue. Thanks!