Get only noise from my webcam

Camera model

UTHAI DM20(?) cheap cam from aliexpress (1.91€ 71% OFF|UTHAI D01 Stick freies 1080P 720P 480P netzwerk teaching USB kamera live computer kamera| | - AliExpress)

What is the problem?

I get only noise. The cam work on PC.

What did you already try to solve it?

Changed resolution and frame rate. Added the -y param.
Seems like the pi detect the cam:

v4l2-ctl -d /dev/video0 --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)
            Size: Discrete 640x480
                    Interval: Discrete 0.033s (30.000 fps)
            Size: Discrete 480x320
                    Interval: Discrete 0.033s (30.000 fps)
            Size: Discrete 720x480
                    Interval: Discrete 0.033s (30.000 fps)
            Size: Discrete 1920x1080
                    Interval: Discrete 0.033s (30.000 fps)
    [1]: 'YUYV' (YUYV 4:2:2)
            Size: Discrete 640x480
                    Interval: Discrete 0.045s (22.000 fps)
            Size: Discrete 320x240
                    Interval: Discrete 0.033s (30.000 fps)
                    Interval: Discrete 0.040s (25.000 fps)

~ $ ffmpeg -f video4linux2 -list_formats all -i /dev/video0
ffmpeg version 4.1.4-1+rpt1~deb10u1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 8 (Raspbian 8.3.0-6+rpi1)
configuration: --prefix=/usr --extra-version='1+rpt1~deb10u1' --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --arch=arm --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-omx-rpi --enable-mmal --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
[video4linux2,v4l2 @ 0x15d41c0] Compressed: mjpeg : Motion-JPEG : 1280x720 640x480 480x320 720x480 1920x1080
[video4linux2,v4l2 @ 0x15d41c0] Raw : yuyv422 : YUYV 4:2:2 : 640x480 320x240
/dev/video0: Immediate exit requested

Have you tried running in safe mode?

Yes

Did running in safe mode solve the problem?

No...

Systeminfo Bundle

octoprint-systeminfo-20240223161411.zip (254.4 KB)

Additional information about your setup

Hi,

I'm trying to connect a webcam to my OctoPrint, and I get noise (regardless of the resolution I choose).

The cam work perfect with a PC.

I tried to add the -y param, but then the daemon won't start.

There's no log for the webcam daemon in /var/log.

I found in that folder a file named daemon.log with the following:

Feb 23 11:07:23 mathilda webcamd[1438]: Starting up webcamDaemon...

Feb 23 11:07:23 mathilda webcamd[1438]: --- Configuration: ----------------------------

Feb 23 11:07:23 mathilda webcamd[1438]: cfg_file: /boot/octopi.txt

Feb 23 11:07:23 mathilda webcamd[1438]: camera: usb

Feb 23 11:07:23 mathilda webcamd[1438]: usb options: -r 1920x1080 -f 30

Feb 23 11:07:23 mathilda webcamd[1438]: raspi options: -fps 10

Feb 23 11:07:23 mathilda webcamd[1438]: http options: -w ./www-octopi -n

Feb 23 11:07:23 mathilda webcamd[1438]: Explicitly USB device:

Feb 23 11:07:23 mathilda webcamd[1438]: -----------------------------------------------

Feb 23 11:07:23 mathilda webcamd[1438]: Found video devices:

Feb 23 11:07:23 mathilda webcamd[1438]: /dev/video0

Feb 23 11:07:23 mathilda webcamd[1438]: /dev/video1

Feb 23 11:07:23 mathilda webcamd[1438]: /dev/video10

Feb 23 11:07:23 mathilda webcamd[1438]: /dev/video11

Feb 23 11:07:23 mathilda webcamd[1438]: /dev/video12

Feb 23 11:07:23 mathilda webcamd[1438]: config file='/boot/octopi.txt':USB device was not set in options, start MJPG-streamer with the first found video device: /dev/video0

Feb 23 11:07:23 mathilda webcamd[1438]: <13>Feb 23 11:07:23 root: Starting USB webcam

Feb 23 11:07:23 mathilda webcamd[1438]: Running ./mjpg_streamer -o output_http.so -w ./www-octopi -n -i input_uvc.so -r 1920x1080 -f 30 -d /dev/video0

Feb 23 11:07:23 mathilda webcamd[1438]: MJPG Streamer Version: git rev: 501f6362c5afddcfb41055f97ae484252c85c912

Feb 23 11:07:23 mathilda webcamd[1438]: i: Using V4L2 device.: /dev/video0

Feb 23 11:07:23 mathilda webcamd[1438]: i: Desired Resolution: 1920 x 1080

Feb 23 11:07:23 mathilda webcamd[1438]: i: Frames Per Second.: 30

Feb 23 11:07:23 mathilda webcamd[1438]: i: Format............: JPEG

Feb 23 11:07:23 mathilda webcamd[1438]: i: TV-Norm...........: DEFAULT

Feb 23 11:07:23 mathilda webcamd[1438]: UVCIOC_CTRL_ADD - Error at Pan (relative): Inappropriate ioctl for device (25)

Feb 23 11:07:23 mathilda webcamd[1438]: UVCIOC_CTRL_ADD - Error at Tilt (relative): Inappropriate ioctl for device (25)

Feb 23 11:07:23 mathilda webcamd[1438]: UVCIOC_CTRL_ADD - Error at Pan Reset: Inappropriate ioctl for device (25)

Feb 23 11:07:23 mathilda webcamd[1438]: UVCIOC_CTRL_ADD - Error at Tilt Reset: Inappropriate ioctl for device (25)

Feb 23 11:07:23 mathilda webcamd[1438]: UVCIOC_CTRL_ADD - Error at Pan/tilt Reset: Inappropriate ioctl for device (25)

Feb 23 11:07:23 mathilda webcamd[1438]: UVCIOC_CTRL_ADD - Error at Focus (absolute): Inappropriate ioctl for device (25)

Feb 23 11:07:23 mathilda webcamd[1438]: UVCIOC_CTRL_MAP - Error at Pan (relative): Inappropriate ioctl for device (25)

Feb 23 11:07:23 mathilda webcamd[1438]: UVCIOC_CTRL_MAP - Error at Tilt (relative): Inappropriate ioctl for device (25)

Feb 23 11:07:23 mathilda webcamd[1438]: UVCIOC_CTRL_MAP - Error at Pan Reset: Inappropriate ioctl for device (25)

Feb 23 11:07:23 mathilda webcamd[1438]: UVCIOC_CTRL_MAP - Error at Tilt Reset: Inappropriate ioctl for device (25)

Feb 23 11:07:23 mathilda webcamd[1438]: UVCIOC_CTRL_MAP - Error at Pan/tilt Reset: Inappropriate ioctl for device (25)

Feb 23 11:07:23 mathilda webcamd[1438]: UVCIOC_CTRL_MAP - Error at Focus (absolute): Inappropriate ioctl for device (25)

Feb 23 11:07:23 mathilda webcamd[1438]: UVCIOC_CTRL_MAP - Error at LED1 Mode: Inappropriate ioctl for device (25)

Feb 23 11:07:23 mathilda webcamd[1438]: UVCIOC_CTRL_MAP - Error at LED1 Frequency: Inappropriate ioctl for device (25)

Feb 23 11:07:23 mathilda webcamd[1438]: UVCIOC_CTRL_MAP - Error at Disable video processing: Inappropriate ioctl for device (25)

Feb 23 11:07:23 mathilda webcamd[1438]: UVCIOC_CTRL_MAP - Error at Raw bits per pixel: Inappropriate ioctl for device (25)

Feb 23 11:07:23 mathilda webcamd[1438]: o: www-folder-path......: ./www-octopi/

Feb 23 11:07:23 mathilda webcamd[1438]: o: HTTP TCP port........: 8080

Feb 23 11:07:23 mathilda webcamd[1438]: o: HTTP Listen Address..: (null)

Feb 23 11:07:23 mathilda webcamd[1438]: o: username:password....: disabled

Feb 23 11:07:23 mathilda webcamd[1438]: o: commands.............: disabled

Feb 23 11:07:24 mathilda webcamd[1438]: Done bring up all configured video device

Feb 23 11:07:24 mathilda webcamd[1438]: Goodbye...

Any ideas??!:worried:

Thanks!