I have a Dell XPS 9370, which is known to have only one camera. But ls /dev/video*
results in /dev/video0 /dev/video1 /dev/video2 /dev/video3
, so four different camera devices.
These four cameras bubble up to the applications, e.g. Skype which lists four cameras, but just the first one (/dev/video0
) works.
Does anybody know where the other entries come from? Or how to hide them from higher layers?
The answer given here https://unix.stackexchange.com/questions/512759/multiple-dev-video-for-one-physical-device is a good one. I have the same problem with Skype and it started when I upgraded the kernel from 4.4.x to 5.1.x so somewhere in there the uvcvideo module produced a different output. However, has it is pointed out the output of
does show that each entry has a different capability, and in the case of my logitech usb camera only 1 has video capture. So this is most likely a bug in Skype, that appeared after the kernel probably fix a bug themselves, that does not only shows the entries that have a "Video capture" capability.
Each camera has a second metadata device added to output timestamp information or detailed per frame metadata
You can use
v4l2-ctl
to get more information on a device, and can usev4l2-ctl --list-formats --device /dev/videoX
to determine if it contains video streams.To list just devices with video data use:
This can be combined with
fzf
to select a camera and launch a program:To find out what each device is, you can run this (and change the number in video0 to video1, etc):
Googling Dell XPS 9370 gives information that this model has also an infrared camera in addition to the normal web camera, and the infrared camera can be used for authenticating with face recognition. https://wiki.archlinux.org/index.php/Dell_XPS_13_(9370)
If you want to disable for example the IR camera, more information about your system is needed, for example dmesg.
The difference between /dev/video0 and /dev/video1 for a single camera is that one is for 'Video Capture' and the other is for 'Metadata Capture'.
It can be checked in 'Device Caps' info below:
The following command shows the info for /dev/video0:
And for /dev/video1: