raspberrypi / picamera2

New libcamera based python library
BSD 2-Clause "Simplified" License
852 stars 181 forks source link

[HOW-TO] Get the current exposure mode #1016

Open nudefireninja opened 5 months ago

nudefireninja commented 5 months ago

How can I get the current value of 'AeExposureMode'?

I get a KeyError when I try picam2.capture_metadata()['AeExposureMode']

davidplowman commented 5 months ago

libcamera doesn't report every single metadata item, particularly items that cannot change on their own. I think 'AeExposureMode' will only be reported when you change it, and it will report it for the first frame that has "seen" the new value. I think the default value will be "normal", and after then it will be whatever you change it to.