First of all, thank you for giving me an interesting idea.
I'm using MS lifecam hd-5000 for Ubuntu 22.04.
I ran cam.py directly but my webcam is not recognized.
The connected USB information is as follows.
(comfyUI) ➜ ComfyUI git:(master) ✗ lsusb Bus 002 Device 002: ID 1058:25a3 Western Digital Technologies, Inc. Elements Desktop (WDBWLG) Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 045e:076d Microsoft Corp. LifeCam HD-5000 Bus 001 Device 002: ID 0bda:8771 Realtek Semiconductor Corp. Bluetooth Radio Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
The error message is as follows
(comfyUI) ➜ ComfyUI git:(master) ✗ python custom_nodes/ComfyUI_toyxyz_test_nodes/CaptureCam/cam.py [ WARN:0@0.017] global cap_v4l.cpp:982 open VIDEOIO(V4L2:/dev/video0): can't open camera by index [ WARN:0@0.017] global obsensor_stream_channel_v4l2.cpp:82 xioctl ioctl: fd=-1, req=-2140645888 [ WARN:0@0.017] global obsensor_stream_channel_v4l2.cpp:138 queryUvcDeviceInfoList ioctl error return: 9 [ WARN:0@0.017] global obsensor_stream_channel_v4l2.cpp:82 xioctl ioctl: fd=-1, req=-2140645888 [ WARN:0@0.017] global obsensor_stream_channel_v4l2.cpp:138 queryUvcDeviceInfoList ioctl error return: 9 [ERROR:0@0.017] global obsensor_uvc_stream_channel.cpp:156 getStreamChannelGroup Camera index out of range [ WARN:0@18.837] global cap_v4l.cpp:982 open VIDEOIO(V4L2:/dev/video0): can't open camera by index [ WARN:0@18.838] global obsensor_stream_channel_v4l2.cpp:82 xioctl ioctl: fd=-1, req=-2140645888 [ WARN:0@18.838] global obsensor_stream_channel_v4l2.cpp:138 queryUvcDeviceInfoList ioctl error return: 9 [ WARN:0@18.838] global obsensor_stream_channel_v4l2.cpp:82 xioctl ioctl: fd=-1, req=-2140645888 [ WARN:0@18.838] global obsensor_stream_channel_v4l2.cpp:138 queryUvcDeviceInfoList ioctl error return: 9 [ERROR:0@18.838] global obsensor_uvc_stream_channel.cpp:156 getStreamChannelGroup Camera index out of range Error: Failed to capture frame. Exception in Tkinter callback Traceback (most recent call last): File "/home/lupin/miniconda3/envs/comfyUI/lib/python3.10/tkinter/__init__.py", line 1921, in __call__ return self.func(*args) File "/home/lupin/genAI/ComfyUI/custom_nodes/ComfyUI_toyxyz_test_nodes/CaptureCam/cam.py", line 158, in stop_capture self.root.configure(background='SystemButtonFace') File "/home/lupin/miniconda3/envs/comfyUI/lib/python3.10/tkinter/__init__.py", line 1675, in configure return self._configure('configure', cnf, kw) File "/home/lupin/miniconda3/envs/comfyUI/lib/python3.10/tkinter/__init__.py", line 1665, in _configure self.tk.call(_flatten((self._w, cmd)) + self._options(cnf)) _tkinter.TclError: unknown color name "SystemButtonFace" [ WARN:0@30.679] global cap_v4l.cpp:982 open VIDEOIO(V4L2:/dev/video1): can't open camera by index [ WARN:0@30.679] global obsensor_stream_channel_v4l2.cpp:82 xioctl ioctl: fd=-1, req=-2140645888 [ WARN:0@30.679] global obsensor_stream_channel_v4l2.cpp:138 queryUvcDeviceInfoList ioctl error return: 9 [ WARN:0@30.680] global obsensor_stream_channel_v4l2.cpp:82 xioctl ioctl: fd=-1, req=-2140645888 [ WARN:0@30.680] global obsensor_stream_channel_v4l2.cpp:138 queryUvcDeviceInfoList ioctl error return: 9 [ERROR:0@30.680] global obsensor_uvc_stream_channel.cpp:156 getStreamChannelGroup Camera index out of range Error: Failed to capture frame.
First of all, thank you for giving me an interesting idea. I'm using MS lifecam hd-5000 for Ubuntu 22.04.
I ran cam.py directly but my webcam is not recognized. The connected USB information is as follows.
(comfyUI) ➜ ComfyUI git:(master) ✗ lsusb Bus 002 Device 002: ID 1058:25a3 Western Digital Technologies, Inc. Elements Desktop (WDBWLG) Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 045e:076d Microsoft Corp. LifeCam HD-5000 Bus 001 Device 002: ID 0bda:8771 Realtek Semiconductor Corp. Bluetooth Radio Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
The error message is as follows
(comfyUI) ➜ ComfyUI git:(master) ✗ python custom_nodes/ComfyUI_toyxyz_test_nodes/CaptureCam/cam.py [ WARN:0@0.017] global cap_v4l.cpp:982 open VIDEOIO(V4L2:/dev/video0): can't open camera by index [ WARN:0@0.017] global obsensor_stream_channel_v4l2.cpp:82 xioctl ioctl: fd=-1, req=-2140645888 [ WARN:0@0.017] global obsensor_stream_channel_v4l2.cpp:138 queryUvcDeviceInfoList ioctl error return: 9 [ WARN:0@0.017] global obsensor_stream_channel_v4l2.cpp:82 xioctl ioctl: fd=-1, req=-2140645888 [ WARN:0@0.017] global obsensor_stream_channel_v4l2.cpp:138 queryUvcDeviceInfoList ioctl error return: 9 [ERROR:0@0.017] global obsensor_uvc_stream_channel.cpp:156 getStreamChannelGroup Camera index out of range [ WARN:0@18.837] global cap_v4l.cpp:982 open VIDEOIO(V4L2:/dev/video0): can't open camera by index [ WARN:0@18.838] global obsensor_stream_channel_v4l2.cpp:82 xioctl ioctl: fd=-1, req=-2140645888 [ WARN:0@18.838] global obsensor_stream_channel_v4l2.cpp:138 queryUvcDeviceInfoList ioctl error return: 9 [ WARN:0@18.838] global obsensor_stream_channel_v4l2.cpp:82 xioctl ioctl: fd=-1, req=-2140645888 [ WARN:0@18.838] global obsensor_stream_channel_v4l2.cpp:138 queryUvcDeviceInfoList ioctl error return: 9 [ERROR:0@18.838] global obsensor_uvc_stream_channel.cpp:156 getStreamChannelGroup Camera index out of range Error: Failed to capture frame. Exception in Tkinter callback Traceback (most recent call last): File "/home/lupin/miniconda3/envs/comfyUI/lib/python3.10/tkinter/__init__.py", line 1921, in __call__ return self.func(*args) File "/home/lupin/genAI/ComfyUI/custom_nodes/ComfyUI_toyxyz_test_nodes/CaptureCam/cam.py", line 158, in stop_capture self.root.configure(background='SystemButtonFace') File "/home/lupin/miniconda3/envs/comfyUI/lib/python3.10/tkinter/__init__.py", line 1675, in configure return self._configure('configure', cnf, kw) File "/home/lupin/miniconda3/envs/comfyUI/lib/python3.10/tkinter/__init__.py", line 1665, in _configure self.tk.call(_flatten((self._w, cmd)) + self._options(cnf)) _tkinter.TclError: unknown color name "SystemButtonFace" [ WARN:0@30.679] global cap_v4l.cpp:982 open VIDEOIO(V4L2:/dev/video1): can't open camera by index [ WARN:0@30.679] global obsensor_stream_channel_v4l2.cpp:82 xioctl ioctl: fd=-1, req=-2140645888 [ WARN:0@30.679] global obsensor_stream_channel_v4l2.cpp:138 queryUvcDeviceInfoList ioctl error return: 9 [ WARN:0@30.680] global obsensor_stream_channel_v4l2.cpp:82 xioctl ioctl: fd=-1, req=-2140645888 [ WARN:0@30.680] global obsensor_stream_channel_v4l2.cpp:138 queryUvcDeviceInfoList ioctl error return: 9 [ERROR:0@30.680] global obsensor_uvc_stream_channel.cpp:156 getStreamChannelGroup Camera index out of range Error: Failed to capture frame.