BETA: Chrome Capture for Channels

Does this only work with Google Chrome? Or will it work with Chrome based browsers, like Edge, Brave, Chromium etc.

4 Likes

I've seen that but am not sure why it happens. If you rm -rf chromedata then it seems to work reliably again for a while.

1 Like

Would it be fair to say that this is Channels' own (better!) version of PlayOn or are there differences?

3 Likes

You can use, for example:

CHROME_BIN="/Applications/Brave Browser.app/Contents/MacOS/Brave Browser" node main.js

Anything that supports chrome devtools protocol and works with puppeteer should work.

5 Likes

I deleted .config/google-chrome which did reset chrome but unfortunately that error is persisting.

3 Likes

The node command creates a chromedata in the directory where you ran it.

1 Like

For some reason I cannot get a consistent encode going. It starts the stream and minimizes but then moments later restarts. I can stream OK on the box itself and there seems to be plenty of CPU available.

3 Likes

How do you install on Linux Ubuntu? Git only lists windows and Mac

All would be via terminal.

Install Node 18 How to install Node.js 18 on Ubuntu 20.04 LTS by Josh Sherman
Clone repo
Edit main.js and hard code path to chrome
node main.js

3 Likes

Very cool! This is working great for me over here, with CDVR on a Mac. I tried adding some other web pages on my own, like the CDVR Web admin page, just as a test. Edited this into lines 52-62 of main.js:

  app.get('/stream/:name?', async (req, res) => {
    var u = req.query.url
    let name = req.params.name
    if (name) {
      u = {
        cbnc: 'https://www.nbc.com/live?brand=cnbc&callsign=cnbc',
        nbcnews: 'https://www.nbc.com/live?brand=nbc-news&callsign=nbcnews',
        weatherscan: 'https://weatherscan.net/',
        cdvr: 'http://x.x.x.x:8089/admin/settings',
      }[name]
    }

(yes, x.x.x.x is my CDVR's IP address)

...but when I try "tuning in," I get an error: The connection to the tuner was lost. Press play to try again.

Here is my custom channel m3u:

#EXTM3U

#EXTINF:-1 channel-id="weatherscan", Weatherscan
chrome://x.x.x.x:5589/stream/weatherscan

#EXTINF:-1 channel-id="cdvr",CDVR
chrome://x.x.x.x:5589/stream/stream/cdvr

I also am not seeing any activity in Terminal when this attempt fails. Are there other edits required for manually adding our own web page choices as channels, like this?

1 Like

*waits patiently for screenshots of someone's Home Assistant dashboard.

6 Likes

I am up and running on Linux with a RTX 3060. The prior card wasn't cutting it.

One exception I am seeing is if the app is minimized its not capturing video and audio. As soon as I unminimized it works great!

Now I am thinking about Xvfb again to host each encoder instance.

1 Like

You have an extra '/stream' in there

1 Like

Hi there,
What would you do if you need to setup on Synology dsm 7
I would like to stay away from running multiple systems but thourhg I would ask.

1 Like

lol, go figure. Thanks a million.
This beta feature :metal: ROCKS :metal:

:exploding_head:

4 Likes

This is awesome! 2 quick things:

  1. Any chance the "cbnc" typo in main.js can be fixed in the repo? :grimacing:
  2. The window doesn't seem to be sizing right on macOS. I'm getting some pillarboxing in the stream. I included screenshots of both the stream and the chrome window.

2 Likes

Up and running on an old 2013 Mac Pro. It's barely sweating. These machines can be purchased dirt cheap these days and would make perfect tuners.

One thing I am needing to figure out is CNBC keeps asking me if my provider is hulu. Need to click on an element to validate.

Screenshot 2023-06-19 at 6.18.16 PM
Screenshot 2023-06-19 at 6.18.02 PM

3 Likes

fixed

should be better now

i made it minimize only on macOS for now

1 Like

This was on Linux. Working perfectly on MacOS :slight_smile:

3 Likes

Trying to run this on linux. I am unable to login to my Google account to link NBC to my YTTV account when Chrome is launched with this app. Chrome says "Couldn't sign you in. This browser or app may not be secure." I can login if I run Chrome normally.

1 Like