Have a different webcam framerate/resolution

I have a Logitech C920 with a Pi4 connected via gigabit to a decently powered desktop and would love to take advantage of the power to get a 1080P/30FPS feed from the camera. After looking at the list I set my parameters to -r 1920x1080 -f 30. This works great generally but when on the control view of Octoprint, my desktop browser slows to a crawl and the stream framerate gradually degenerates until it freezes (I believe the PI is relatively unaffected). The network utilization is about 70mbps. I believe this is due to the images saturating the link (perhaps the NIC on the PI) and the browser makes sure it has all of the image data, even those it missed.

Does anyone have any suggestions to either get a full 1080/30 feed or to have a low-resolution high-framerate feed but also have high-resolution for time-lapses?

It also is an older version of the c920 that does include onboard H.264 encoding and it would be amazing to utilize that, but I have spent many nights trying to get it to work to no avail.

Its because basically your browser is trying to download a image 1920x1080 30 times a second. You need a really powerfull pc to handle that - are you also rotating/flipping the image?

If you want that kind of video resolution make the video stream in another video format - like:

1 Like

Thanks! No post-processing, the browser handled it pretty well when pointed directly at the stream so I was wondering if Octoprint was adding something that changed how the browser interpreted the stream (i.e., it now doesn't drop frames that don't make it).

I'll take a deep breath and then jump into the link you shared!

There's a lot more going on in the OctoPrint UI that can slow the tab down, compared with running it outside the OctoPrint UI. I have noticed this sometimes, not much you can do about it I don't think, other than lower either the resolution or frame rate.

1 Like

Btw try my plugin UI customizer and under advanced try turning on disable terminal when inactive.

But as @Charlie_Powell said the OctoPrint ui has a really much going on due to the way the updates to the UI is handled by knockout.

And if you are using Firefox then try Chrome.

1 Like

Where can I find the plug in?

The plugin manager in OctoPrint's settings