I'm running octoprint 1.3.10 on image 4.14.98-v7+ with a Raspberry pi 3B+, my webcam is a Logitech C615. I'm unable to change the webcam resolution. Any change I made in /boot/octopi.txt simply makes the webcam unavailable because of an error, the log says:
Starting up webcamDaemon...
--- Configuration: ----------------------------
camera: usb
usb options: -r 1920x1080 -f 5 -y
raspi options: -fps 10
http options: -w ./www
Explicitly set USB device was found in options: -r 1920x1080 -f 5 -y
Found video devices:
/dev/video0
Configured USB camera was not detected, trying again in two minutes
When I check the webcam log, with default parameters, I see:
Running ./mjpg_streamer -o output_http.so -w ./www -i input_uvc.so -r 640x480 -f 10 -d /dev/video0
MJPG Streamer Version: git rev: 821c330ea6bbb5fbed98d48e00aac156e923161b
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 10
i: Format............: JPEG
i: TV-Norm...........: DEFAULT
Now, I just kill the mjpg thread, cd to /home/pi/mjpg-streamer and run the same command again: this fails.
./mjpg_streamer: invalid option -- 'w'
When I strip the "faulty" arguments:
./mjpg_streamer: invalid option -- 'd'
./mjpg_streamer: invalid option -- 'f'
I already lost a stupid amount of time on this. Anyone can tell me what's going wrong?
EDIT: The Spaghetti Detective was the problem. In /var/log/syslog, libv412 was complaining about /dev/video0:
Feb 11 20:32:58 octopi webcamd[4053]: libv4l2: error setting pixformat: Device or resource busy Feb 11 20:32:58 octopi webcamd[4053]: Unable to set format: 1196444237 res: 1280x720 Feb 11 20:32:58 octopi webcamd[4053]: Init v4L2 failed !! exit fatal Feb 11 20:32:58 octopi webcamd[4053]: i: init_VideoIn failed
A little digging with fuser and ps to figure out what was keeping the video device busy and The Detective turned out to be the culprit. I've disabled the plugin for now ... if it's not going to let me use 1280x720 it's unlikely I'll re-enable it.
Original Post:
I'm using a Logitech C270 and I'm now in low-res hell. When I first installed it a week or two ago, it worked fine in 1280x720 @ 30fps (just as I configured it in octopi.txt). It showed in glorious widescreen in the Octopi control page, but now it shows only 640x480 in 4:3 ratio (horizontally letterboxed if I select 16:9 in webcam settings).
I'm suspecting it has something to do with keeping my Pi up-to-date; maybe I shouldn't have been running apt update/upgrade?