BETA: Chrome Capture for Channels

I don't think Contour works the same way. Say I went to Nickelodeon to play live...

image

... when I did so, it generated a link that was unique to a combination of the Program | Session ID | Station...

image

If you remove any of those, it does not work; it just takes you back to general listings. There is nothing like https://watch.cox.com/live/NIKHD that will just take you there without the end-runaround.

1 Like

Do you know what your bitrate was? I checked stats on my iPhone, and I'm also getting 1920x1080 @ 60 FPS, but the bitrate is under 5000. Assuming the same on my streaming devices, that might be why I notice some artifacts when watching on a bigger television.

Earlier today I was trying to create a Keyboard Maestro macro that would detect when Chrome Capture crashes and automatically restart it. I didn't know how to monitor for a crash, so I fell back to trying to run a check a couple times a day to see if it was running, and, if not, start it. I tried with this AppleScript in my macro, but it didn't detect whether the process was running:

tell application "System Events"
	count of (processes where name = "chrome-capture-for-channels-macos-arm64")
end tell

That was followed by a "if count is 0" qualifier. But even when Chrome Capture was already running, it was trying to launch it again. So I gave up at that point.

(I haven't actually had any crashes yet, but wanted something in place in case it happens)

You can adjust the bitrate in main.js

1 Like

Thanks. Noob question, but after I change the bitrate in main.js, how do I repackage everything (or whatever the term is) into an executable file?

1 Like

npm run build

Will generate exe in dist/

1 Like

Is that for Mac? I've tried running it from a few different directories in terminal, and get "command not found: npm"

1 Like

Yes I did the same and got the same results:
As close as I could get:

Using Chrome, load Cox, Search for MSNBC, right click on found MSNBC icon, Open in New Tab,
click on that tab and an MSNBC list of 3 things with a play button on CH nn shows up
Click the Play button and it plays.(Note: I'm logged into cox with saved creds in Chrome)

here’s the link for that tab with the Play button:
h ttps://watchtv.cox.com/search/MSNBC/5064998174375437105

On that “playing” screen I get a link, here’s the link for that tab: Its whatever is on
h ttps://watchtv.cox.com/live/Watch-Nicolle-Wallace/5064998174375437105/MNBCHD

If I try to remove the show title and try
h ttps://watchtv.cox.com/live /5064998174375437105/MNBCHD

It just goes to the channel list page with all the channels.

For any other non-programmers following along (programmers are rolling their eyes right about now…), I've dug into this enough to gather that I think it isn't as simple as typing the command "npm run build" somewhere. You first need to install node.js (I followed these instructions). I got that far, but I'm still not sure where I now type "npm run build" to compile/build the executable from the code, with the changed bitrate.

npm is generally part of the node installation. but it may not be, depends what kind of system you're on and how you installed nodejs

i've uploaded new exe with increased bitrate of 8mbps

The code that controls this is here:

You can open the dev tools in chrome on that KTLA page, and paste those lines into the console to see what the effect is.

Just installed the macOS app v0.1.5 on Intel MacBook Pro and it crashes instantly. I had to revert back to v0.1.3.

1 Like

Thank you for the upload. It's crashing on launch, unfortunately (or at least Terminal on the Mac is giving me a "killed" message). As far as npm and node, the problem was I I didn't know what they were or that they even existed beyond possibly hearing them mentioned (I'm not a programmer). Now that I have node installed, I don't know what to do with the "npm run build" command, such as where to type it. A Terminal window, I presume, but where exactly and at what point, I don't know.

Can you explain what you mean by the "dev" steps? Even when I do these steps, I get a "killed" message in Terminal:

cd ~/[location of the unzipped download]
chmod +x chrome-capture-for-channels-macos-arm64
./chrome-capture-for-channels-macos-arm64

That's the version that works for me, too, without crashing (I'm using the arm64 version, though).

2 Likes

Also getting crash with V0.1.5 on Windows 11

1 Like

Okay v0.1.7 should work on macOS

Trying to get it to work on Ubuntu. But it's not opening Chrome.

2023/06/21 20:10:48.796] Chrome Capture server listening on port 5589
[2023/06/21 20:11:06.684] failed to start stream https://weatherscan.net/ ReferenceError: page is not defined
at /home/daddycool81/chrome-capture-for-channels/main.js:258:38
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[2023/06/21 20:11:06.692] GET /stream/weatherscan from ::ffff:192.168.x.xx responded 500 in 844.502 ms
/home/daddycool81/chrome-capture-for-channels/main.js:285
await page.close()
^

ReferenceError: page is not defined
at /home/daddycool81/chrome-capture-for-channels/main.js:285:7
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.16.0

Nope, doesn’t crash immediately, however as soon as I try to tune a channel, it opens chrome and then crashes….

1 Like

@tmm1

V0.1.6 crashes on Windows with connection lost (-17)

2023/06/21 17:21:44.506402 [TNR] Opened connection to M3U-Chromecapture for ch10205 Windy
2023/06/21 17:21:44.989797 [HLS] ffmpeg: chrome-Windy:  [http @ 0x80707e000] HTTP error 500 Internal Server Error
2023/06/21 17:21:44.989866 [HLS] ffmpeg: chrome-Windy:  http://192.168.50.149:5589/stream/windy: Server returned 5XX Server Error reply
2023/06/21 17:21:44.991106 [ERR] Error during stream M3U-Chromecapture ch10205 Windy: exit status 1
2023/06/21 17:21:44.991159 [TNR] Closed connection to M3U-Chromecapture for ch10205 Windy
2023/06/21 17:21:44.991601 [SNR] Buffer statistics for 192.168.50.188 (OnePlus 9 Pro 5G) for ch10205 Windy: buf=0% drop=0%

snippet from server log on last test run
This was all working prior to my changing to the bitrate of 8mbps executable.
I doubt it's a bandwidth issue as all servers are running hardwired 1Gb.

@Matthew_Thompson2 try git pull now

1 Like

V0.1.8 isn’t crashing, however the picture is severely cropped on top and bottom. Is this issue still a work in progress?

1 Like

On which website?