How to get a list of video capture devices (web cameras) on linux ( ubuntu )? (C/C++)

You can use the following bash command:

v4l2-ctl --list-devices

In order to use the above command, you must install package v4l-utils before. In Ubuntu/Debian you can use the command:

sudo apt-get install v4l-utils

Leave a Comment