Four /dev/video entries but just one camera
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
v4l2-ctl --device=/dev/video* --all
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 use v4l2-ctl --list-formats --device /dev/videoX
to determine if it contains video streams.
To list just devices with video data use:
for dev in `find /dev -iname 'video*' -printf "%f\n"`
do
v4l2-ctl --list-formats --device /dev/$dev | \
grep -qE '\[[0-9]\]' && \
echo $dev `cat /sys/class/video4linux/$dev/name`
done
This can be combined with fzf
to select a camera and launch a program:
for dev in `find /dev -iname 'video*' -printf "%f\n"`;do; v4l2-ctl --list-formats --device /dev/$dev | grep -qE '\[[0-9]\]' && echo $dev `cat /sys/class/video4linux/$dev/name`;done | fzf | awk '{ printf("/dev/%s", $1) }' | xargs guvcview --device
To find out what each device is, you can run this (and change the number in video0 to video1, etc):
cat /sys/class/video4linux/video0/name
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.