Trying out the new webcam but realise it's not in an ideal position - too close it needs moving further away
I got excited and jumped the gun. That cam was delivered today and all is not as it seems. It proudly proclaims H.264 on the box and in the listing and I thought this would be the answer. Nope. As far as I can work this out the situation is this:
- OctoPi only supports MJPG compression.
- The Spaghetti Detective (TSD) only supports H.264 so it kills off OctoPrint's webcamd and runs its own if you're in premium mode. I think if you disable that, it'll convert the webcamd feed but only at 1f/10s
- This cam does seem to support H.264 but only on /dev/video2. By contrast, a Logitech C920 (which I refuse to pay between £80 and £200 for!) shows YUYV, H264 and MJPG all on /dev/video0 and hence works nicely.
Let it default to /dev/video0 and it'll work but it only offers 30fps in any resolution. Cue Pi 3b+ topping out its CPU trying to handle running an MJPG stream and FFMPEG convert it to H.264 for TSD.
For contrast, the Logitech C920 offers 5,7.5,10,15,20,24,30 in all resolutions and in any of YUYV, MJPG, H264.
So, the manual focus is good. The FoV is good. Quality seems ok too. But no use for TSD.
Just to add insult to injury, even with a C920, TSD seems to force it to 4:3, 640x480@25fps (which the cheaper cam wouldn't support anyway) and ignores any options such as manual focus specified in /boot/octopi.txt
If you're not running TSD in premium mode or are running a Pi4 (more power to throw at it) this may well not be an issue.
So, I'll be returning it, obviously. Well, that's what I was thinking up till a minute of so ago. With the Sony Playstation 3 Eye I can have a max of 640x480 but at silly fps that aren't any use. At 10fps it takes about 70% cpu usage to run the mjpg_streamer (for the cam) ffmpeg (to convert for TSD) processes. Quality is a bit fuzzy and low light is ...adequate. By low light, I'm talking about a 30cm strip of LEDs rather than having the room lights on. If I specify the options well, I can have 800x448@10fps with sharper picture courtesy of the manual focus, wider FoV (widescreen res) and better low light for 'only' 60% CPU....so I think it'll stay.
camera_usb_options="-d /dev/video0 -yuv -r 800x448 -f 10"
Hope this is of some help to some of you!