[Libav-user] list all available formats of webcam

Hans, Sven Sven.Hans at dermalog.com
Tue Apr 16 15:55:33 EEST 2019

Dear ffmpeg experts,

How to list all supported resolutions of a webcam?

Using the command line tool with the following command:

ffmpeg -f dshow -list_options true -i video="HD Pro Webcam C920"

I can successfully list all supported video resolutions and formats of the connected Logitech usb webcam. How can I get this list programmatically with help of the C-API?

I can successfully open and stream this usb camera using the C-API, but I have to call

av_dict_set(&m_pInOptions, "video_size", sVideoSize.c_str(), 0);

with a supported video_size before calling

ret = avformat_open_inptut(&m_pFormatCtxInCam, szUrl, m_pInFrmt, &m_pInOptions)

by checking for ret == -5 I can retry opening the camera with a different video_size.
At the moment I loop over a list with several standard video resolutions and try to open
The webcam. This is very inconvienient. Also I would like return a list of supported resolutions.

Mit freundlichen Grüßen / Best regards

Sven Hans
DERMALOG Identification Systems GmbH
Systems Engineer

Mittelweg 120 | 20148 Hamburg | Germany
Fon +49 40 413227 0

Fax +49-40-413227-40

Mail Sven.Hans at dermalog.com<mailto:Sven.Hans at dermalog.com>

Web www.dermalog.com<https://www.dermalog.com>

SECURITY - Made in Germany
Biometrics * AFIS * ABIS * Face * Iris * Live Scanners * Border Control * ID Card & Passport Systems * National Identification Solutions * Biometric Banking & Payment Solutions * Mobile Devices

DERMALOG - The Biometrics Innovation Leader * Winner of 36 international Awards
+ Innovator des Jahres 2018 - Innovator of the Year 2018 - brandeins Wissen Statista
+ CEO 100 - Best 100 CEOs 2018 - Acquisition International
+ CEO of the year 2018 Biometrics ­­- CEO of the year 2018 - Acquisition International
+ Deutschlands innovativste Mittelständler 2017 - Wirtschafts Woche
-> Find out more about our international Awards here<https://www.dermalog.com/company/awards/>

This e-mail may contain information that is confidential or proprietary to DERMALOG Identification Systems GmbH. Any unauthorized disclosure, distribution or other use is prohibited.

P Please consider the environment before printing this email


DERMALOG Identification Systems GmbH * Mittelweg 120, 20148 Hamburg, Germany
CEO/Managing Director: Günther Mull * Commercial Register: AG Hamburg HRB 69547
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20190416/e9e89634/attachment.html>

More information about the Libav-user mailing list