I need to get the compatible framerate/resolution of the available cameras. How can this be done with the ffmpeg library? I've tried using the functions of avdevice but all of them seem to retrieve an error. I am not able to get a list of the available devices as well.
This is being done on a mac using avfoundation (and it will later be ported to windows with dshow).
Thank you for your time.
Try running
ffmpeg -f dshow -list_options true -i video="Integrated Camera"
replacing 'dshow' and "Integrated Camera" with whatever you have, depending on the platform. As above, you can get the name of the video device with
ffmpeg -f dshow -list_devices true -i x
You can then pipe the resulting output to a file using the > operator, or to a further command-line tool for processing with the | operator. For example,
ffmpeg -f dshow -list_options true -i video="Integrated Camera" > test.txt
or
ffmpeg -f dshow -list_options true -i video="Integrated Camera" | grep 'pixel_format'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With