Adjusting webcam resolution

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?

Bump. This issue is quite simple, I can't be the only one?

You're not alone I've the same issue with my C910.

Having the same issue @foosel is there anything you could recommend regargind this issue?

Can't change Logitech C615 resolution, even the settings mentioned for this one on Webcams-known-to-work do not work for me either, image is frozen :frowning:

Currently runing lastest stable Octopi build on raspberry Pi 4 -4Gb.

Hello @curiosus0ne!

@foosel is on vacation these days and approximately the next two weeks. It may take a time for an answer.

Hi @Ewald_Ikemann , thanks for the info! Have you got any clue or know of anyone who could help?

I've noticed the same thing. I've set 1920x1080, 1280x720, and others, but the rendered resolution is 640x480. I'm also not getting a webcam log file.

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?

The author of The Spaghetti Detective here. At this moment TSD can't streaming USB camera on resolutions higher than 640x480, unfortunately. The details can be found here: https://www.thespaghettidetective.com/docs/more-about-webcam-streaming/#i-configured-a-high-resolution-and-other-things-like-auto-focus-in-octopitxt-but-the-premium-webcam-streaming-doesnt-take-them

If high-res is more important than 25 fps for you (which I understand), you will need to disable 25 fps streaming: https://www.thespaghettidetective.com/docs/disable-25-fps-streaming/