I am trying to use a USB webcam on the RPi 3 B+. I have been having issues with open cv when trying to access video. I typed "ls /dev/video*" to see the devices and the webcam appears as both /dev/video0 and /dev/video1. How can I fix this?
$ ls /dev/video*
/dev/video0 /dev/video1 /dev/video10 /dev/video11 /dev/video12
Also I tried plugging the camera to my laptop and it appears as just one device.
Re: USB Webcam Appears as 2 Devices
Does it work? Can you use dev/video0 ?batresh wrote: ↑Mon Jul 22, 2019 2:28 pmI am trying to use a USB webcam on the RPi 3 B+. I have been having issues with open cv when trying to access video. I typed "ls /dev/video*" to see the devices and the webcam appears as both /dev/video0 and /dev/video1. How can I fix this?
$ ls /dev/video*
/dev/video0 /dev/video1 /dev/video10 /dev/video11 /dev/video12
Also I tried plugging the camera to my laptop and it appears as just one device.
Re: USB Webcam Appears as 2 Devices
I can take pictures from the webcam but I can not stream video from it.
When I use cv2.imshow or cv2.VideoCapture I get the following error:
(Webcam1:1213): Gtk-WARNING **: cannot open display:
Since I have been able to use other open cv functions I was guessing that the Pi seeing the webcam as 2 devices might be the issue.
When I use cv2.imshow or cv2.VideoCapture I get the following error:
(Webcam1:1213): Gtk-WARNING **: cannot open display:
Since I have been able to use other open cv functions I was guessing that the Pi seeing the webcam as 2 devices might be the issue.
-
6by9
- Raspberry Pi Engineer & Forum Moderator

- Posts: 18233
- Joined: Wed Dec 04, 2013 11:27 am
- Location: Cambridge, ZZ9 Plural Z Alpha
Re: USB Webcam Appears as 2 Devices
Check the formats that the two nodes can stream. "v4l2-ctl --list-formats-ext".
Memory says that uvcvideo (the kernel module responsible for USB Video Class devices) was updated a while back to support providing metadata as well as video data. The two streams come from independent nodes. Linux 4.16 by the looks of it.
Memory says that uvcvideo (the kernel module responsible for USB Video Class devices) was updated a while back to support providing metadata as well as video data. The two streams come from independent nodes. Linux 4.16 by the looks of it.
Code: Select all
commit 68c5735eaa5e680e701c9a2d1e3c7880bdf5ab66
Merge: 2246edf 273caa2
Author: Linus Torvalds <[email protected]>
Date: Tue Feb 6 11:27:48 2018 -0800
Merge tag 'media/v4.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
<snip>
- add support for UVC metadata
Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.
I'm not interested in doing contracts for bespoke functionality - please don't ask.