Camera model
Microsoft LifeCam HD-3000 + Raspi cam attached with the ribbon cable
What is the problem?
Can't get the pi cam running along the usb webcam. Using the files from here i get the warning device or resource busy:
pi@octopi:~/scripts $ ./webcamDaemon2 start
Feb 25 2021 12:13:12
Copyright (c) 2012 Broadcom
version 564e5f9b852b23a330b1764bcf0b2d022a20afd0 (clean) (release) (start_x)
camera: usb
usb options: -r 640x480 -f 10
raspi options: -fps 10 -d /dev/video2
~/mjpg-streamer ~/scripts
Running ./mjpg_streamer -o output_http.so -p 8081 -w ./www -i input_uvc.so -r 640x480 -f 10
MJPG Streamer Version: git rev: 501f6362c5afddcfb41055f97ae484252c85c912
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 10
i: Format............: JPEG
i: TV-Norm...........: DEFAULT
libv4l2: error setting pixformat: Device or resource busy
Unable to set format: 1196444237 res: 640x480
Init v4L2 failed !! exit fatal
i: init_VideoIn failed
What did you already try to solve it?
Using the guide above, changed video0 to video2. Checked who is potentially using that device:
pi@octopi:~/scripts $ sudo fuser /dev/video0
/dev/video0: 490m
pi@octopi:~/scripts $ ps -p 490
PID TTY TIME CMD
490 ? 00:12:20 mjpg_streamer
Logs (/var/log/webcamd.log
, syslog, dmesg, ... no logs, no support)
journalctl -u webcamd
-- Logs begin at Sat 2021-03-13 12:06:30 CET, end at Sun 2021-03-14 14:34:56 CET. --
-- No entries --
syslog prints endless repeat messages like
Mar 14 15:14:57 octopi MJPG-streamer [14799]: starting application
Mar 14 15:14:57 octopi MJPG-streamer [14799]: MJPG Streamer Version: git rev: 501f6362c5afddcfb41055f97ae484252c85c912
Mar 14 15:14:57 octopi MJPG-streamer [14799]: Using V4L2 device.: /dev/video0
Mar 14 15:14:57 octopi MJPG-streamer [14799]: Desired Resolution: 640 x 480
Mar 14 15:14:57 octopi MJPG-streamer [14799]: Frames Per Second.: 10
Mar 14 15:14:57 octopi MJPG-streamer [14799]: Format............: JPEG
Mar 14 15:14:57 octopi MJPG-streamer [14799]: TV-Norm...........: DEFAULT
Mar 14 15:14:57 octopi MJPG-streamer [14799]: init_VideoIn failed
relevant dmesg output:
[ 9.256307] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[ 9.257457] usbcore: registered new interface driver brcmfmac
[ 9.315126] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43455-sdio.raspberrypi,3-model-b-plus.txt failed with error -2
[ 9.346253] uvcvideo: Found UVC 1.00 device Microsoft® LifeCam HD-3000 (045e:0779)
[ 9.361309] input: Microsoft® LifeCam HD-3000: Mi as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/input/input0
[ 9.361890] usbcore: registered new interface driver uvcvideo
[ 9.361907] USB Video Class driver (1.1.1)
[ 9.466192] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[ 9.466373] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[ 9.469526] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[ 9.469580] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[ 9.479196] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[ 9.479254] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
[ 9.486673] bcm2835-v4l2-0: scene mode selected 0, was 0
[ 9.487164] bcm2835-v4l2-0: V4L2 device registered as video2 - stills mode > 1280x720
[ 9.492414] bcm2835-v4l2-0: Broadcom 2835 MMAL video capture ver 0.0.2 loaded.
[ 9.549249] usbcore: registered new interface driver snd-usb-audio
[ 9.584264] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip BCM4345/6
[ 9.637094] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Jan 4 2021 19:56:29 version 7.45.229 (617f1f5 CY) FWID 01-2dbd9d2e
Additional information about your setup (OctoPrint version, OctoPi version, ...)
v4l2-ctl --list-devices:
bcm2835-codec-decode (platform:bcm2835-codec):
/dev/video10
/dev/video11
/dev/video12
bcm2835-isp (platform:bcm2835-isp):
/dev/video13
/dev/video14
/dev/video15
/dev/video16
mmal service 16.1 (platform:bcm2835-v4l2-0):
/dev/video2
Microsoft® LifeCam HD-3000: Mi (usb-3f980000.usb-1.1.3):
/dev/video0
/dev/video1
lsusb:
Bus 001 Device 004: ID 045e:0779 Microsoft Corp. LifeCam HD-3000
Bus 001 Device 005: ID 0424:7800 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
/boot/octopi.txt: (i did not touch it)
### Windows users: To edit this file use Notepad++, VSCode, Atom or SublimeText.
### Do not use Notepad or WordPad.
### MacOSX users: If you use Textedit to edit this file make sure to use
### "plain text format" and "disable smart quotes" in "Textedit > Preferences"
### Configure which camera to use
#
# Available options are:
# - auto: tries first usb webcam, if that's not available tries raspi cam
# - usb: only tries usb webcam
# - raspi: only tries raspi cam
#
# Defaults to auto
#
#camera="auto"
### Additional options to supply to MJPG Streamer for the USB camera
#
# See https://faq.octoprint.org/mjpg-streamer-config for available options
#
# Defaults to a resolution of 640x480 px and a framerate of 10 fps
#
#camera_usb_options="-r 640x480 -f 10"
Rpi4 2GB, 64GB SD Card, OctoPrint version : 1.5.3, OctoPi version : 0.17.0
All of the above is voodoo to me for the most part. What i do not understand is why there is no log, why v4l2-ctl lists so many devices, whereas in the guide there are only 4. If i interpret it correctly my usb cam gets picked as default (as detailed in octopi.txt) but for some reason I have trouble identifying the video device and just guessing and entering those in the webcamDaemon2 file does not lead anywhere