Is there a terminal command that lists all the webcams connected to my computer, including the native one? Maybe using ffmpeg package?
To list all video devices picked up by the kernel
ls -ltrh /dev/video*
To list all devices attached to USB use
lsusb ; to list all devices attached to PCI use
sudo apt-get install v4l-utils v4l2-ctl --list-devices
Sample output with a single camera:
Integrated Camera (usb-0000:00:1a.0-1.6): /dev/video0
Tested on Ubuntu 16.04.
More details can be found here: https://stackoverflow.com/questions/4290834/how-to-get-a-list-of-video-capture-devices-web-cameras-on-linux-ubuntu-c
For Windows you can use the pygrabber library: https://github.com/bunkahle/pygrabber
To check the user friendly names of the connected webcams:
from __future__ import print_function from pygrabber.dshow_graph import FilterGraph graph = FilterGraph() print(graph.get_input_devices())