Webcam Lag in Octoprint at 1080p

Camera model Raspicam v2 using 30cm ribbon cable

What is the problem?

At 640x480 resolution seems to be OK.

Crank up the resolution to 1080p and the lag between user input and mjpeg_streamer output is > 5 seconds. Load average < 5%

Should I expect it not to work well at high resolutions ( Gigabit LAN computer & pi4 wired) ?

What did you already try to solve it?

  • Reboot / Read forum pages
  • Brand new install on new SD with Octopi 1.5.3 update
  • Running with no plugins except Themeify

Additional information about your setup (OctoPrint version, OctoPi version, ...)
Pi 4B with cooling fan
OctoPrint v1.5.3
OctoPi 0.18

--- Configuration: ----------------------------
cfg_file: /boot/octopi.txt
camera: raspi
usb options: -r 640x480 -f 10
raspi options: -x 1920 -y 1080 -fps 10
http options: -w ./www-octopi -n --listen

Explicitly USB device:

Found video devices:
config file='/boot/octopi.txt':Start MJPG-streamer with video device: raspi
<13>Mar 26 09:56:35 root: Starting Raspberry Pi camera
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 -w ./www-octopi -n --listen -i -x 1920 -y 1080 -fps 10
    MJPG Streamer Version: git rev: 5554f42c352ecfa7edaec6fc51e507afce605a34
  • i: fps.............: 10*
  • i: resolution........: 1920 x 1080*
  • i: camera parameters..............:*

Sharpness 0, Contrast 0, Brightness 50
Saturation 0, ISO 0, Video Stabilisation No, Exposure compensation 0
Exposure Mode 'auto', AWB Mode 'auto', Image Effect 'none'
Metering Mode 'average', Colour Effect Enabled No with U = 128, V = 128
Rotation 0, hflip No, vflip No
ROI x 0.000000, y 0.000000, w 1.000000 h 1.000000

  • o: www-folder-path......: ./www-octopi/*
  • o: HTTP TCP port........: 8080*
  • o: HTTP Listen Address..:*
  • o: username:password....: disabled*
  • o: commands.............: disabled*
  • i: Starting Camera*
    Encoder Buffer Size 81920
    Done bring up all configured video device


If you open the webcam URL in a new tab, does it have less lag there? Usually the URL is http://your-ip/webcam/?action=stream. Sometimes, because there is a lot going on in the OctoPrint UI the browser doesn't keep up with everything.