How get camera's list available capture formats using UVC driver in Linux. In Linux system zero connect camera will have name /dev/video0 and this project works with it. If you want get information from first camera, set another number. Note that some cameras makes two Linux devices per camera. In this case you are interesting in number 0, 2, 4, 6, ... More details about code here
I use conan for my project. So, first of all you should install conan itself.
pip install conan --pre --user
pip install conan --user --upgrade
cd V4L2_list-formats
rm -Rf build
conan profile detect --force
conan install . --output-folder=build --build=missing
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release
cmake --build .\
Run file V4L2_list-formats/build/V4L2_list-formats via console. You can see something like this