What is the problem?
Getting a Microscope type USB camera to work. Mine is a Veho VMS-001. What did you already try to solve it?
Checked the Webcam log and device log (udevadm output). Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...)
OctoPi .14 OctoPrint 1.3.6 Pi3B
Solution: Make sure the resolution and frame rate match the camera.
Make sure the aspect ratio matches in the OctoPrint settings.
I realize that the Web Camera stuff is supported through mjpg-streamer so my question is who do I go talk to? Him, or the OctoPi guy?
I’ve got one of the microscope type USB cameras which I think is perfect for this application as it gives me a zoomed up view of the printing region.
The RP3 is seeing the device, I’m guessing mpjg-streamer isn’t.
OctoPi .14
OctoPrint 1.3.6
RP3B
Here's the udevadm output for that device if it helps any:
looking at parent device '/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-
1.5:1.0':
KERNELS=="1-1.5:1.0"
SUBSYSTEMS=="usb"
DRIVERS=="uvcvideo"
ATTRS{interface}=="Venus USB2.0 Camera"
ATTRS{iad_bInterfaceCount}=="02"
ATTRS{iad_bFunctionSubClass}=="03"
ATTRS{bInterfaceProtocol}=="00"
ATTRS{bInterfaceNumber}=="00"
ATTRS{bInterfaceSubClass}=="01"
ATTRS{bInterfaceClass}=="0e"
ATTRS{iad_bFirstInterface}=="00"
ATTRS{bAlternateSetting}==" 0"
ATTRS{authorized}=="1"
ATTRS{bNumEndpoints}=="01"
ATTRS{iad_bFunctionClass}=="0e"
ATTRS{supports_autosuspend}=="1"
ATTRS{iad_bFunctionProtocol}=="00"
Some cameras will freak out if you try to force a framerate it doesn't support, the setting will try to set the framerate though, it's not like OctoPrint's baud setting that has to match the printer's baud.
I'd try the common framerates, 10, 15, 25, 30 and see if that helps.
Otherwise, it looks like the camera is working from that log? maybe? I don't see any "camera not found" and all those other errors are fairly common.
You could try stopping the mjpeg server, then start it manually with various parameters to see if any of them work for you. I've seen some people say the only way to get it to work is to modify the script that runs mjpeg streamer and remove the default framerate switch because trying to set any kind of frame rate caused the camera to fail.
Ok. Changing the frame rate to 15 seems to have done something.
I get a picture when I access the stream directly in a separate window but it doesn't show up under OctoPrint.. It is also extremely lagged maybe 2 minutes worth!
The camera stream isn't really what I'd call wifi friendly and requires a lot of bandwidth, my wireless signal is pretty weak and the cam stream gets choppy, but when running on ethernet the stream is smooth. Check your wireless connection speed (also if it's a pi3, the built in wifi is utter garbage) and try moving the device around a bit for a better signal. I ended up shoving a wifi dongle on the end of a 3m long usb cable & hanging it on a door knob in the hallway, worked great after that.
I finally got it to show in OctoPrint, needed the aspect ratio to match. I’ve got both ethernet and WiFi enabled and working, is there a way to use both?
Force the mjpg-streamer to use ethernet?
I’ve got both ethernet and WiFi enabled and working, is there a way to use both?
Force the mjpg-streamer to use ethernet?
Short answer: yes
Long answer: it's complicated
It's much easier to just stick with one, if you can use ethernet then do so, it'll probably be more reliable than wifi. There's not much benefit from accessing octoprint's web pages via wifi and the cam stream over ethernet, you're better off just accessing both over the one (ethernet) connection and turn off wifi to keep it simple.