BETA: Chrome Capture for Channels

Of course, CDVR probably already has a nicely optimized instance of ffmpeg running, if so, perhaps @tmm1 might consider providing an option to transcode the whole CC4C source.

@doug8796
Turn bitrate to 5.65mbit, (thats what spectrum uses) - not many others go higher.

No go. One of the sources I've tried is my URay HDMI encoder. Chrome always downloads regardless of the bit rate or whether I use the TS or HLS URLs.

Not sure about you but setting sub 60fps helps,

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

This works best for me.

1 Like

I have had 2 streams at once, I can probably get more than 3 if I set for 720p. Most channels are not even 1080.

How many windows can you run at once on a mac pro?

I am going to add to code to make 2nd tab render 720p to make sure 2 can work then add a 3rd that may be lower res.

I have that code working now, I can run two browsers at once, but the second one looks like only 1.5-2mbit instead of closer to 6, so there will be a drop in quality.

Not for me. On HDMI yes because of the stupid banner they like to put on the screen in the NBC app, but not Chrome. The only problem you have is the 4-hour time limit for recording because the stream times out at that point.

1 Like

could just add that into the code to refresh browser at 4 hours. not hard. I have the code working decent, but 3 streams really pushes my pc. I am running on ssd, instead of nvme, but I dont think that would help much. an i9 or mac server might be better. has anyone else run more than 3 streams at once?

I am finishing up stuff this week basically everything works, directvstream, full screen, but only 1 stream works amazing, 2nd stream has to take a bit of a fps loss, but not too bad. I do 57fps for stream 1 and around 59 for stream 2

@doug8796, I have tested 4 streams on my CC4C machine, and the recordings looked the same as 1 stream. It would run around 70% on the CPU, and around 60% on the GPU. i7-8700 and a GTX 1050, PC is dedicated to CC4C. I'm running a modified main.js file with these commands inserted.

'--enable-accelerated-video-decode',
'--enable-accelerated-video-encode',

1 Like

I use that as well, but I got some choppyness, I increased pagefile and checked the graphic settings on

Tested 3 streams at once with little issues. Will try playing with windows settings. Do you use channelsdvr/chrome on same hdd? That may help as well.

image

i7 8th gen > i5 7th gen

Never seen more than 30 FPS with the stock code even though min is set to 60. Have no idea why.

I got it working at 60. I enabled stream to be 10.6mbit. if I stream CBS sunday ticket, it needs it, spectrum only uses like 5-6 on stats.

Okay, so how did you get it working? Everybody else is reported that they only get 30 too.

NM checked stats, it shows 30. I need to setup bitrate to lower if not cbs. cbs uses 10.6mbit roughly for streaming but directv/spectrum only use about 5.65 also directvstream wont let you use more than one tab - it knows somehow. not sure how to get around it unless it opens a new browser instead of tab

1 Like

Using another pc / browser works and incognito works, but new tab or new window gives the only stream one at a time error.

My CC4C setup is on a separate PC from my Channels DVR server. When watching sports I can detect a slight bit of judder, but when watching regular programming it's not noticeable. Even for sports, while not perfect, it is watchable. I'd have to check my main.js file again, but I think I have it set for 12Mbps, with Fubo as the source. Seemed to help when capturing sports, to have the bit rate higher.

I agree with that. I dont think over 10.6 will get much better, as its pretty variable and will go to like 11.3 , thats for 1080i sources like cbs, most channels are much lower, like I said 5.65 never needed more. TVE sources may go to about 6.7 though.

I will likely have to add code to make it run --incognito

Also since freevee/tubi/hulu/prime (will) have ads , there should be a way for us to type the title we want, and cc4c records and we can watch later. we need some sort of search function to make it work, devs? I really just need an input feature, I could build a scrapper that scrapes hulu movies/shows and prime etc. then needs select and then cc4c can record in the back end.

  1. You would need to do a rehaul of channels , but it would be like adding a source, netflix, hulu, paramount etc, and it runs like an m3u, and executes like my directv code.

It works doing

#EXTM3U
#EXTINF:-1 channel-id="ESPN",ESPN
chrome://localhost:5589/stream?url=http://stream.directv.com/guide/?ch=ESPN

You could do something like,

#EXTM3U
#EXTINF:-1 channel-id="Netflix",Netflix
chrome://localhost:5589/stream?url=http://netflix.com/?ch=default

  1. Make a scrapper/pull from database of netflix/hulu select the movie from the list, on select that value becomes default and the code runs.

@tmm1

I have this installed on a Linux system via Docker and i'm getting this error trying to launch any of the default NBC streams. It previously worked though I recently ran a bunch of apt-get updates and I'm thinking I moved chrome to an unsupported version.

/home/chrome/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:153
cc4channels | throw new Errors_js_1.TimeoutError(error.message);
cc4channels | ^
cc4channels |
cc4channels | TimeoutError: Timed out after 30000 ms while waiting for the WS endpoint URL to appear in stdout!
cc4channels | at ChromeLauncher.launch (/home/chrome/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:153:23)

Stop the container and start it again, and you'll be back to where it was when you downloaded it.

Spectrum has blocked Fox Sports TVE streams from outside the home network. I was able to get FOX Sports working, with a little bit of work.

First, I had to disable the blocking of other extensions by commenting out the --disable-extensions-except argument on line 31 on main.js (also get rid of the extra comma above), and on line 75 of node_modules/pupeteer-stream/dist/PuppeteerStream.js. Then you can install uBlock Origin from the Chrome Store.

In uBlock Origin, you need to add this as a filter. The Fox Sports side has a preview video below the main video that confuses C4CC. Sometimes it will play the wrong video, and sometimes it will not stay in full screen, if you don't block that page element.
www.foxsports.com##.live-on-fox-secondary-collection

After that, it should work like any other network. Here's what I have:

#EXTINF:-1 channel-id="FS1",FS1
chrome://IP:5589/stream?url=https://www.foxsports.com/live/fs1

#EXTINF:-1 channel-id="BTN",BTN
chrome://IP:5589/stream?url=https://www.foxsports.com/live/btn

#EXTINF:-1 channel-id="FS2",FS2
chrome://IP:5589/stream?url=https://www.foxsports.com/live/fs2```

I have installed and got it working with Spectrum TV online with Fox Sports in Portainer stack but has a low frame rate probably I would say 30 or lower. I am wondering if it’s my old Mac Pro from 2009 which is causing these issues. What are the computer requirements for this to work and would a Mini PC be up to the challenge to get this to work?