Chrome Capture for Channels

Awesome…Thanks! And I’m assuming I can have powershell automatically fire this up upon windows startup?

Yes there are ways

Yeah you can create a simple batch file that just has that in it.

Hit Win-R, enter shell:startup and you'll be in the run at start folder. Then create a shortcut to the batch file. Make sure the run from directory is set to where main.js is.

I tested faux 4k from YouTubetv with trial. They offer 1080p upscaled to 4k on their app on android but not pc/windows. There is probably a way to exploit it and get the stream. Is there a better way to record YouTubetv than cc4c/hdmi4channels? Is there a YouTube version?

Any YouTubetv users?

Feel free to modify the js and repost it if yours works better than mine and doesn't break anything. Otherwise I'll play with suggestions.

4k recording probably needs modern i5 or i7/i9 or xeon

re: "Is there a better way to record YouTubetv than cc4c/hdmi4channels?"

I'm having good results on YoutubeTV with the adbtuner app used with chomecast-with-google-tv dongles (with hardwired ethernet adapters) and vecaster hdmi encoders. I'm not trying to do 4k with them, though I do have the 4k versions of the chromecasts for the additional processing power they have and I assume that you could get 4k working via Channels with the appropriate hdmi capture devices.

1 Like

So I added await browser.close() to line 285, but nothing happens...the chrome window stays maximized on my desktop. Below is the section of code where line 285 eventually comes up. I'm assuming I've probably typed in await browser.close() incorrectly?

try {
const stream = await getStream(page, {
video: true,
audio: true,
videoBitsPerSecond: 8000000,
audioBitsPerSecond: 192000,
mimeType: 'video/webm;codecs=H264',
videoConstraints: {
mandatory: {
minWidth: viewport.width,
minHeight: viewport.height,
maxWidth: viewport.width,
maxHeight: viewport.height,
minFrameRate: 60,
await browser.close() },
},
})

So to update my issue I have discovered that if i use Software Decoder it shows the pic etc So I gues this U7 tv has a missing codec or so.....Which is weird since all Lower model Hisense TVs work fine......Besides NOT using it any ideas??

Why did you add this? It's limited to 30fps, nothing you do can change this

For those of you that want DirecTVStream/Puffer to work this is the format you need to use

LA-CBS- http://localhost:5589/stream?url=https://puffer.stanford.edu/player/?ch=C
LA-CBS-I - http://localhost:5589/stream?url=https://puffer.stanford.edu/player/?ch=I
LA-NBC - http://localhost:5589/stream?url=https://puffer.stanford.edu/player/?ch=N
LA-FOX - http://localhost:5589/stream?url=https://puffer.stanford.edu/player/?ch=F
LA-PBS - http://localhost:5589/stream?url=https://puffer.stanford.edu/player/?ch=P
LA-CW - http://localhost:5589/stream?url=https://puffer.stanford.edu/player/?ch=W
LA-ABC - http://localhost:5589/stream?url=https://puffer.stanford.edu/player/?ch=A

DirecTV is the same way

http://localhost:5589/stream?url=http://stream.directv.com/guide/?ch=ESPNHD

Replace ESPNHD with your desired channel

This can work on other pages that need to be typed in manually

That code that I have above was already in the main.js file that I downloaded from github. Should I change that minframerate line from 60 to 30?

Regardless though, my main concern here is how to get the window on my desktop to close after I’m done playing the channel. It was mentioned that I add that simple code of await browser.close() to line 285 which I did, but it caused the main.js file to not even work so I imagine I just didn’t type in that line properly? Hoping someone can show me exactly how to type that in. Thanks!

Just use my js file, it closes when you close the stream just fine.

is that ncc-7-0.js that is in NewChromeCapture70.zip? Do I just take that file, rename it to main.js and replace the original main.js file?

Apologies I shouldn't have given line numbers as they are specific to my js file that I have added start up flags etc to. It should go directly after "await page.close()"

I will say that my js file breaks nbc shortcuts, so I need to figure out how to fix them

    nbc: 'https://www.nbc.com/live?brand=nbc&callsign=nbc',
    cnbc: 'https://www.nbc.com/live?brand=cnbc&callsign=cnbc',
    msnbc: 'https://www.nbc.com/live?brand=msnbc&callsign=msnbc',
    nbcnews: 'https://www.nbc.com/live?brand=nbc-news&callsign=nbcnews',
    bravo: 'https://www.nbc.com/live?brand=bravo&callsign=bravo_east',
    bravop: 'https://www.nbc.com/live?brand=bravo&callsign=bravo_west',
    e: 'https://www.nbc.com/live?brand=e&callsign=e_east',
    ep: 'https://www.nbc.com/live?brand=e&callsign=e_west',
    golf: 'https://www.nbc.com/live?brand=golf&callsign=golf',
    oxygen: 'https://www.nbc.com/live?brand=oxygen&callsign=oxygen_east',
    oxygenp: 'https://www.nbc.com/live?brand=oxygen&callsign=oxygen_west',
    syfy: 'https://www.nbc.com/live?brand=syfy&callsign=syfy_east',
    syfyp: 'https://www.nbc.com/live?brand=syfy&callsign=syfy_west',
    usa: 'https://www.nbc.com/live?brand=usa&callsign=usa_east',
    usap: 'https://www.nbc.com/live?brand=usa&callsign=usa_west',
    universo: 'https://www.nbc.com/live?brand=nbc-universo&callsign=universo_east',
    universop: 'https://www.nbc.com/live?brand=nbc-universo&callsign=universo_west',
    necn: 'https://www.nbc.com/live?brand=necn&callsign=necn',
    nbcsbayarea: 'https://www.nbc.com/live?brand=rsn-bay-area&callsign=nbcsbayarea',
    nbcsboston: 'https://www.nbc.com/live?brand=rsn-boston&callsign=nbcsboston',
    nbcscalifornia: 'https://www.nbc.com/live?brand=rsn-california&callsign=nbcscalifornia',
    nbcschicago: 'https://www.nbc.com/live?brand=rsn-chicago&callsign=nbcschicago',
    nbcsphiladelphia: 'https://www.nbc.com/live?brand=rsn-philadelphia&callsign=nbcsphiladelphia',
    nbcswashington: 'https://www.nbc.com/live?brand=rsn-washington&callsign=nbcswashington',
    weatherscan: 'https://weatherscan.net/',
    windy: 'https://windy.com',
  }[name];
}

Just keep the original. Modify the bat for 2 seconds instead of 1 and run the bat. It initializes it better. Chrome capture requires a source to be open 2x on first initialization. My bad fixes this problem

That worked…thanks!

So I have the directory C:\chrome-capture-for-channels which contains a few folders and several files including main.js as you’ll see in the picture…

Should I simply add ncc-7-0.js and NewChromeCapture.bat to that directory and then run the .bat file? Should I delete the main.js file?

Yes. Same directory

I was getting some weird issues when trying to run your version of chrome capture and the browser on the desktop wouldn’t automatically close when I was done watching a channel.

I was able to get the browser to close when using main.js from the original install by adding the line: await browser.close() to the appropriate spot. I think I want to stick with that setup, but the one thing I did find that worked with your version of chrome capture is that it didn’t take 2 tries/multiple tries to get the channel to play. Any chance you can give me the code you used to fix that? I was thinking I could then just add that code to my main.js file and I’ll be good to go. I’m only using chrome capture to watch live streaming web cams anyway. Thanks!

Thats odd it doesnt close. Did you click square? You can modify the bat to use main.js instead of my ncc070.js Can you screen shot it? It can also run headless which will use a little less memory/cpu power. Look for headless in the js file.

I tried to go back to using your setup but now I’m getting windows exception errors. I’m just gonna stick with the regular main.js setup that is described towards the beginning of this thread. My main goal was to get the browser to close when you’re done watching a channel and that’s what happens so I can live with the very minor inconvenience of having to hit play twice in channels to get the channel to load. I won’t be doing any recording on these channels anyway since they are simply live web cams I want to drop in on every now and then. Thanks again for your help!