Reputation: 718
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.
Upvotes: 3
Views: 4642
Reputation: 68
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'
Upvotes: 1