Camera stream laggy/skipping (Logitech C922, Pi 3B+)

Camera model
Logitech C922

What is the problem?
The camera stream (both in the OctoPrint UI, and through the /webcam/?action=stream stream) is not matching the quality / FPS as the /boot/octopi.txt settings. The stream skips a frame every now and then.

The logs suggest that it is running at 1080p, however the framerate definitely does not feel like it's running at 30fps.

What did you already try to solve it?
I have tried changing the settings in /boot/octopi.txt however it does not seem to change anything.

Logs (/var/log/webcamd.log, syslog, dmesg, ... no logs, no support)

Starting up webcamDaemon...

--- Configuration: ----------------------------
cfg_file: /boot/octopi.txt
camera: usb
usb options: -r 1920x1080 -f 30
raspi options: -fps 10
http options: -w ./www

Explicitly USB device:

Found video devices:
/dev/video0
/dev/video1
/dev/video10
/dev/video11
/dev/video12
/dev/video13
/dev/video14
/dev/video15
/dev/video16
/dev/video18
config file='/boot/octopi.txt':USB device was not set in options, start MJPG-streamer with the first found video device: $
<13>Feb 8 00:26:15 root: Starting USB webcam
Checking for VL805 (Raspberry Pi 4)...

  • It seems that you don't have VL805 (Raspberry Pi 4).
    There should be no problems with USB (a.k.a. select() timeout)
    Running ./mjpg_streamer -o output_http.so -w ./www -i input_uvc.so -r 1920x1080 -f 30 -d /dev/video0
    MJPG Streamer Version: git rev: 5554f42c352ecfa7edaec6fc51e507afce605a34
    i: Using V4L2 device.: /dev/video0
    i: Desired Resolution: 1920 x 1080
    i: Frames Per Second.: 30
    i: Format............: JPEG
    i: TV-Norm...........: DEFAULT
    UVCIOC_CTRL_ADD - Error at Pan (relative): Inappropriate ioctl for device (25)
    UVCIOC_CTRL_ADD - Error at Tilt (relative): Inappropriate ioctl for device (25)
    UVCIOC_CTRL_ADD - Error at Pan Reset: Inappropriate ioctl for device (25)
    UVCIOC_CTRL_ADD - Error at Tilt Reset: Inappropriate ioctl for device (25)
    UVCIOC_CTRL_ADD - Error at Pan/tilt Reset: Inappropriate ioctl for device (25)
    UVCIOC_CTRL_ADD - Error at Focus (absolute): Inappropriate ioctl for device (25)
    UVCIOC_CTRL_MAP - Error at Pan (relative): Inappropriate ioctl for device (25)
    UVCIOC_CTRL_MAP - Error at Tilt (relative): Inappropriate ioctl for device (25)
    UVCIOC_CTRL_MAP - Error at Pan Reset: Inappropriate ioctl for device (25)
    UVCIOC_CTRL_MAP - Error at Tilt Reset: Inappropriate ioctl for device (25)
    UVCIOC_CTRL_MAP - Error at Pan/tilt Reset: Inappropriate ioctl for device (25)
    UVCIOC_CTRL_MAP - Error at Focus (absolute): Inappropriate ioctl for device (25)
    UVCIOC_CTRL_MAP - Error at LED1 Mode: Inappropriate ioctl for device (25)
    UVCIOC_CTRL_MAP - Error at LED1 Frequency: Inappropriate ioctl for device (25)
    UVCIOC_CTRL_MAP - Error at Disable video processing: Inappropriate ioctl for device (25)
    UVCIOC_CTRL_MAP - Error at Raw bits per pixel: Inappropriate ioctl for device (25)
    o: www-folder-path......: ./www/
    o: HTTP TCP port........: 8080
    o: HTTP Listen Address..: (null)
    o: username:password....: disabled
    o: commands.............: enabled
    Done bring up all configured video device

Additional information about your setup (OctoPrint version, OctoPi version, ...)

OctoPrint version: 1.7.3

Are you connected via WiFi? 2.4G or 5G connection? If WiFi, try an ethernet cable.

Mjpg streaming requires quite high bandwidth to stream, it is not a compressed video format really. 1080p 30fps could need anywhere from 30-90mbps.

I would pose the question: do you need a 30fps stream. The easiest way to cut the bandwidth down is to just have the frame rate.