Octoprint no webcam in my VM under Ubuntu

What is the problem?

Hello,
I just get under ubuntu (VM) unfortunately no access to the webcam

What did you already try to solve it?

WRITE HERE

Have you tried running in safe mode?

i tried this here...but it doesnt work help

Did running in safe mode solve the problem?

no

Systeminfo Bundle

You can download this in OctoPrint's System Information dialog ... no bundle, no support!)

octoprint-systeminfo-20231009175921.zip (18.7 KB)

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

i use a vm with a latest ubuntu version.

We need some more information.
Where is the webcam server installed? On the host or in the vm?
If it's in the vm is there a usb passthrough?
How did you configure the lan? Bridged, nat or something unusual?

sorry about that.. but i have not enough knowledge about that..
i did it with this tut video..tut video

so i think i did it on de vm
i did also a passthrough for both usb devices.. printer and camera.
the printer is already done.. just the camera..

i tried also this here for it
mjpg-streamer-setup

thanks for help

alrighty

let's check if the webcam works
run those commands

sudo apt -y install v4l-utils
v4l2-ctl --list-formats-ext

and post the output of v4l2-ctl --list-formats-ext here.

okay, thank you

here the output:

pi@octoprint:~$ v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture

    [0]: 'MJPG' (Motion-JPEG, compressed)
            Size: Discrete 1280x720
                    Interval: Discrete 0.033s (30.000 fps)
                    Interval: Discrete 0.040s (25.000 fps)
                    Interval: Discrete 0.033s (30.000 fps)
                    Interval: Discrete 0.040s (25.000 fps)
            Size: Discrete 640x480
                    Interval: Discrete 0.033s (30.000 fps)
                    Interval: Discrete 0.040s (25.000 fps)
            Size: Discrete 1920x1080
                    Interval: Discrete 0.033s (30.000 fps)
                    Interval: Discrete 0.040s (25.000 fps)
            Size: Discrete 1280x720
                    Interval: Discrete 0.033s (30.000 fps)
                    Interval: Discrete 0.040s (25.000 fps)
                    Interval: Discrete 0.033s (30.000 fps)
                    Interval: Discrete 0.040s (25.000 fps)
    [1]: 'H264' (H.264, compressed)
            Size: Discrete 1280x720
                    Interval: Discrete 0.033s (30.000 fps)
                    Interval: Discrete 0.040s (25.000 fps)
                    Interval: Discrete 0.033s (30.000 fps)
                    Interval: Discrete 0.040s (25.000 fps)
            Size: Discrete 640x480
                    Interval: Discrete 0.033s (30.000 fps)
                    Interval: Discrete 0.040s (25.000 fps)
            Size: Discrete 1920x1080
                    Interval: Discrete 0.033s (30.000 fps)
                    Interval: Discrete 0.040s (25.000 fps)
            Size: Discrete 1280x720
                    Interval: Discrete 0.033s (30.000 fps)
                    Interval: Discrete 0.040s (25.000 fps)
                    Interval: Discrete 0.033s (30.000 fps)
                    Interval: Discrete 0.040s (25.000 fps)
    [2]: 'YUYV' (YUYV 4:2:2)
            Size: Discrete 640x480
                    Interval: Discrete 0.033s (30.000 fps)
                    Interval: Discrete 0.040s (25.000 fps)
            Size: Discrete 1280x720
                    Interval: Discrete 0.033s (30.000 fps)
                    Interval: Discrete 0.040s (25.000 fps)

That looks good

How much did you already do in the vm?
If it's more or less untouched besides the OctoPrint install I would just start over and install everything with

it does everything for you including install mjpeg streamer

Actually I have only lxc containers on the proxmox server. So I created a VM especially for Octoprint (because lxc containers do not really run well... which I also read in the link GitHub. So far it runs well. just the camera. Will but tomorrow just create a new VM with Ubuntu or Debian. Thanks until here. I'll give feedback. Thanks

Only does ustreamer now.

so..i have done everything so far..but unfortunately the camera is not detected by auto detection. i am using a vm from proxmox. have passed both usb devices.
USB Serial (1a86:7523) (Ender3Pro)
PC-W3 (1d6c:0103) (USB-Camera)
as soon as i unplug the camera and plug it in again in the autodetection time it is not recognized.. so i think a problem with the vm..
but when i search the camera manually... i find it

pi@octoprint-server:~$ lsusb
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 003: ID 1d6c:0103 PC-W3 PC-W3
Bus 002 Device 002: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU USB Tablet
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

is there a way to add the camera manually ? incl. haproxy with port 80

i suppose. the link for the camera stream and snapshot is probably communicated in the script... but unfortunately i don't get it that way

Can you do the following:
sudo dmesg -C
plug in camera via USB
sudo dmesg

That will tell you what the VM is seeing as far as the camera. lsusb is fairly worthless.

You can of course set up a camera manually, but the whole point of the script is that you should not need to do that (and I won't be typing out all the steps to achieve that!)

pi@octoprint-server:~ pi@octoprint-server:~ sudo dmesg -C
pi@octoprint-server:~$ sudo dmesg
[ 428.086038] usb 2-2: new high-speed USB device number 11 using xhci_hcd
[ 428.237221] usb 2-2: New USB device found, idVendor=1d6c, idProduct=0103, bcd Device= 0.10
[ 428.237272] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 428.237289] usb 2-2: Product: PC-W3
[ 428.237302] usb 2-2: Manufacturer: PC-W3
[ 428.237313] usb 2-2: SerialNumber: PC-W3
[ 428.324173] mc: Linux media interface: v0.10
[ 428.375979] videodev: Linux video capture interface: v2.00
[ 428.683235] usb 2-2: Found UVC 1.00 device PC-W3 (1d6c:0103)
[ 428.711635] input: PC-W3: PC-W3 as /devices/pci0000:00/0000:00:1e.0/0000:02:1 b.0/usb2/2-2/2-2:1.0/input/input5
[ 428.713245] usbcore: registered new interface driver uvcvideo
[ 428.787340] usbcore: registered new interface driver snd-usb-audio

should be good..
but
No camera was detected during the detection period.
Try again or try a different camera.
pi@octoprint-server:~$

the problem is simply that through the auto detect on any other machine like raspberry and co.. that probably goes through really cleanly... but the problem seems to be with the VM together.i always have to when i plug in the usb... always loop through the usb first at HARDWARE .

what would be missing now ?
if I do the rest by foot... unfortunately

i tried it several times now with the usb plug in and out ... at some point it worked... and the camera works....
thank you very much ... yay

Please use the Solution Checkbox below the post with the solution.

grafik

instead of writing "[SOLVED]" into the title.

  • Users can find the solution faster and have not to read the whole thread
  • The forum software can identify the thread as solved.
2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.