Chrome Capture for Channels

I was not able to get the Docker version of CC4C working on my Windows 10 machine, but I did get far enough to find out that port 5589 was "reserved" and would prevent the container from starting. 5700:5589 allowed the container to start cleanly (but not respond to Channels).

The Windows .EXE version does work (sort of). The video plays fine, but the sound keeps cutting in and out and is not synchronized with the video.

Could this have anything to do with my ports? Is there any way to get the .EXE version to use a different port?

Any other ideas?

My fullscreen solution (using a Chrome extension that automatically makes videos play in full screen) is suddenly no longer working, as the version of Chrome that runs (puppeteer?) now won't load any extensions.

Is there a definitive method for getting YouTube TV streams to open in full screen? I've read through these posts, and there is talk of modifying node.js. My node.js does include this:

const viewport = {
  width: 1920,
  height: 1080,
}

That doesn't do the trick. Even with Chrome in fullscreen, it seems YouTube TV requires typing "f" or selecting full screen for the actual video to fill the window.

Hello all,

I have CC4C set up and it is working overall, but I'm running into a few issues that I need some help resolving:

  1. The recording will occasionally screw up with the audio and video appearing to be sped up. From what I can tell, it seems to do this when there is some other computer processes going on in the background. This also occurs when I'm recording a second stream.

  2. Occasionally, the video will freeze, but the audio continues and is otherwise normal. There doesn't seem to be any particular trigger, though it's happened a couple times when I fast forwarded through a good bit of the video while it was recording. But, other times it worked just fine.

  3. It doesn't always display as full screen (there are black bars on the top and bottom) and sometimes even switches between full and partial screen during the recording. If I notice it in real time, I can go to the Chrome tab and click the full screen button and it will fix it. It seems random.

Items 1 & 2 appear to be related to system performance, but I am running a new Minisforum mini PC with pretty solid specs (AMD Ryzen 7 8745H, integrated Radeon 780M, and 32gb DDR5 5600Mhz), so it doesn't seem like hardware should be a limiting factor here. For reference here are screenshots of the Task Manager Performance tab. The first one is with one recording and the second is with two recordings:

I am running the latest main.js, but have added a few extra arguments that I took from @doug8796's custom file. Those are:

'--disable-notifications',
'--enable-accelerated-video-decode',
'--enable-accelerated-video-encode',
'--enable-features=UseSurfaceLayerForVideoCapture',
'--enable-gpu-rasterization',
'--enable-oop-rasterization',
'--disable-software-rasterizer',
'--disable-gpu-vsync',
'--enable-audio-output',

Any help would be much appreciated. Thanks.

I've tried CC4C, and while I think it's a great idea, it has too many issues in my opinion. I have a machine that meets or slightly exceeds your specs, but I couldnā€™t get past the frame drops, sync issues, and stuttering. I switched to ADBTuner with an Onn Pro and an HDMI encoder, and the difference has been night and day. The quality with the Onn boxes and YouTube TV is actually better than regular TVE.

ADBTuner is incredibly stable and tunes each channel in under two seconds. Iā€™ve had zero issues with it.

That said, Iā€™m not knocking the projectā€”I think itā€™s cool, and some people here have done tremendous work with it. For me, though, it just doesnā€™t meet the "wife acceptance factor."

1 Like

Something I've been meaning to mention in this thread:

I've seen some people suggesting buying hardware just for CC4C. This, to me, would take away the whole point! CC4C is for using your existing hardware if you don't have the resources or desire to expand into new stuff. If you are going to start buying things, ADBTuner is by far the superior option!

2 Likes

I created a fork to add support for Sling TV (unmute/fullscreen) and Google Photo Albums (slideshow) as well as some other browser optimizations (only tested & built the .exe on Windows - see Releases). For determining Sling TV links, be sure to use the portion of the URI that you see when you click the channel logo in the Sling Guide.

I added the option to change input parameters for size, bitrate, codecs, etc. at startup too. (e.g. you can change the default video codec if you don't have an Nvidia card.)

Many thanks to @tmm1, @doug8796, @babsonnexus, and others on this thread for their great work on this!

https://github.com/dravenst/chrome-capture-for-channels

1 Like

Will test drive!
Does it run at 30fps or 60 fps?

I have an input parameter to allow you to set the minFrameRate. The default is 30, but you can set it to 60. I confirmed that it will match the frame rate of the source channel i.e. it will increase to 60 automatically if the frame rate of the source is higher than 30.

Run with the --help parameter to see the options and defaults:
chrome-capture-for-channels-win-x64.exe --help

2 Likes

Did you use my support for DirecTV and puffer? Does it actually work for 60 fps. Can you right click it and see if it is actually 60

I agree but if you use a htpc or something and want all in one you may want an old i7 or newer hw

2 Likes

Your cpu is mobile and sadly not fast enough to handle it without lag. It is throttling dud to being a mobile CPU. A 7th gen i7 from eBay for 40-80 bucks will work great

1 Like

It doesn't appear that the DirecTV code for changing channels in your ncc file works for the free DirecTV stream account I tested. Does the paid DirecTV stream account behave differently? I can add in the code if it does.

Yes, I confirmed via the channels app streaming stats that the streaming for some channels were 60fps (e.g. Sling Golf Channel, MLB) while the vast majority were playing at 30fps.

What about puffer? Did you add the script on nbc to keep it going?

nbc is in there and I did try and merge your previous code for DirecTV, but I wasn't able to get it to work on the free DirecTv account. I haven't had a chance to look at puffer. I also found that the disable framerate limiting option was causing a lot of CPU usage so I removed it in the latest update and exe.

Separately, I know it's a different topic, but I also created a fork for the interesting CH4C project that @Parkside started to use a Windows/Linux PC (e.g. your Channels Server) with an external HDMI encoder. It seems to be a good option if you are running on a low power server (even Raspberry Pi), but it does require purchasing an HDMI encoder (e.g. Link Pi ~$120). I think that project code base could be merged with this one to give the user the option to use an external HDMI encoder or not at startup.

I just tried this, but it throws an error at line 248 when it is called by Channels:

TypeError: Cannot read properties of undefined (reading 'match')

I think it's because urlParam is undefined. I also found that "req" is undefined.

Clearly, I missed a step setting this up. Is this supposed to be used instead of main.js, with no other modifications?

Thanks,
-Jay

@slampman - Thanks for your response. I wasn't aware of this other option, so I'll definitely check it out.

@babsonnexus - Makes sense. In my case, I bought the mini pc for other uses, so this is an add on, but that's a good point. Thanks.

@doug8796 - Good to know. I know these chips perform worse compared to the other versions of the same generation, but surprised it would be so far behind a 5+ year old architecture. Thanks for all your work on this project.

Just started looking into ADBTuner and also saw mentions of "HDMI for Channels" and "Chrome HDMI for Channels". The first two have really long threads and there's alot of info, so trying to wade through and understand everything.

Can anyone give a quick comparison of each option so I can figure out which would work best for me?

Also, it looks like ADBTuner requires both an Android stick/box and a hardware encoder, is that correct? If I go this route, I'd only be using the encoder for this purpose, so I don't need anything fancy - any recommendations on a device?

Thanks everyone.

Interesting! I was trying this with a Lenovo Yoga 900, which is a 2 core, 4 thread mobile I7. It was better than the previous setup on an old I7 7700, but would still suffer from low throughput, freezes, and errors. I tried it on my current laptop (Dell XPS 15 9520), and it worked fairly well without logging any errors. Still not smooth, but useable. On a hunch, I tried setting the chrome process priority to realtime on the Yoga. That almost completely fixed it!. Using the web interface to watch the video, the quality improved greatly, and the throughput went from 250 kbs to 500kbs for the MSNBC stream. I was able to get 10 mb/s on the SyFy stream. I Still get some brief pauses and an occasional error in the Channels log, but now it's usable.

I tried to use the registry method of permanently setting the priority for Chrome to high (apparently realtime is not supported that way), but when chrome capture launches Chrome, up to 16 instances are spawned, and they are set to different priorities. I wrote a program to set all running instances of Chrome to realtime in order to test this. I'm looking for a way to ensure that every instance is set to high priority in the first place. I suppose realtime if fine if the machine is dedicated to this purpose, otherwise high is probably best.

Yes HDMI for channels or adbtuner requires an Android stick and an HDMI encoder, I have three of them running here now and they work pretty good. There's quite a bit of tinkering you have to do to get them set up but when it's done it's pretty reliable.

Chrome for channels on the other hand is utterly unreliable for me. I can get it to work fine with a computer that has enough horsepower (the intel n100 recommended on cube pc's here is not powerful enough), but it will routinely have the video freeze up during playback while audio continues. This is on NBC channels btw. It's almost a 50/50 shot as to whether that happens and then your recording is screwed.

1 Like

Tested on a Core i5-7300HQ + Nvidia GTX 1050 (old laptop). It gets a buffering stutter every couple of minutes coinciding with high CPU usage. I forced windows to use the Nvidia GPU for chrome which seemed to reduce the frequency of stutters, but not eliminate them.