Webcam not working on Ubuntu

Camera model
AUKEY Webcam 1080p Full HD

What is the problem?
The corresponding frame in Octoprint doesn't show an image. The frame shows the adjusted URL [/webcam/?action=stream], telling me that there is a config error.

What did you already try to solve it?

  • tested the same webcam with a test installation on a Raspi (the old, ultra slow B model). It worked, I did however have to make adjustments to the octopi.txt (uncomment the line camera="auto" camera_usb_options="-r 640x480 -f 10 -y")
    From this installation I took the right streaming URL. Here it was already adjusted, on the Linux installations the field was empty.

  • tested on Ubuntu Server 16.04 32Bit, 16.04 64Bit, 18.04 64 Bit. Same behaviour. Tested on 2 different physical machines. Both work fine and super quick in terms of web interface and actual printing, just the webcam doesn't work.

  • checked with lsusb: the webcam is shown as "Bus 002 Device 002: ID 0458:6006 KYE Systems Corp. (Mouse Systems)". I don't have enough Linux KnowHow to gain any knowledge from this information. Do I need an additional driver?

  • tried to check the /log/var folder and tried to check the octopi.txt file - neither exists on any of my test installations. On the Raspi they existed.

  • set up Ubuntu from scratch with the webcam already connected (hoping this would cause the setup program to install the right driver)

Logs (/var/log/webcamd.log, syslog, dmesg, ... no logs, no support)
see above, doesn't exist

Additional information about your setup (OctoPrint version, OctoPi version, ...)

That url will only work if you have a reverse proxy installed and configured. Do you?

OctoPrint does not handle the camera image, it only displays images served by another application. mjpegstreamer is a common option.

Unless you are using the OctoPi image on a raspberry pi, forget any reference to octopi.txt. It is not something used or created by OctoPrint. There's a big difference between OctoPi and OctoPrint.

Thanks, that explains a bit more indeed.
Before I dig deeper into setting up the reverse proxy... - is there any way to find out if the webcam is properly supported by the OS? Linux is not listed under the supported OSs, but given the fact that it works with a raspi proves that there is at least some way to get it to work.

The first step, lsusb shows that the OS sees the device. What next step would prove that it sends data which the OS can understand?
And doesn't there have to be such a thing as a driver for this, like in any other OS?

You don't need a reverse proxy, unless you want to use that specific path. My advice is to first get the camera image working. You need to install mjpegstreamer, and get an image from that.

Great, this did the trick, thanks!

For anybody with the same problem, it's called "mjpg-streamer" and I followed these instructions:
https://tecrobust.com/install-mjpg-streamer-for-ubuntu/#mjpg-6
(although it's touch to link to such an add polluted page)

1 Like