l1npengtul / nokhwa

Cross Platform Rust Library for Powerful Webcam/Camera Capture
Apache License 2.0
524 stars 136 forks source link

How to enumerate compatible formats of a camera index #37

Closed aleokdev closed 2 years ago

aleokdev commented 2 years ago

Hello! I have a webcam of unknown parameters and I'd like to have a list of its supported formats and resolutions. How can you achieve that with the crate? I see there's compatible_camera_formats, but to call it you need a Camera already constructed. I can't construct it because I don't know the format I need to provide. What should I do? (BTW: I'm only using the v4l backend)

aleokdev commented 2 years ago

Constructing a camera with None doesn't always work, as the default parameters don't seem to work with every webcam model.

l1npengtul commented 2 years ago

This is being worked on in 0.10.