Post

Replies

Boosts

Views

Activity

Reply to AVFoundation low-light mode to match native camera's
Some additional info: I can get a 1-second exposure using the following code snippet: [myCaptureSession setSessionPreset: AVCaptureSessionPresetHigh]; [myCaptureDevice setExposureMode:AVCaptureExposureModeCustom]; [myCaptureDevice setExposureModeCustomWithDuration:[myCaptureDevice activeFormat].maxExposureDuration ISO:[myCaptureDevice activeFormat].maxISO completionHandler:nil]; The following snippet should allow up to 1 second exposure -- but it does not. [myCaptureSession setSessionPreset: AVCaptureSessionPresetHigh]; [myCaptureDevice setExposureMode:AVCaptureExposureModeContinuousAutoExposure]; [myCaptureDevice setActiveMaxExposureDuration:[self.captureDevice activeFormat].maxExposureDuration]; [myCaptureDevice setExposureTargetBias:1 completionHandler:nil]; It seems that AVCaptureExposureModeContinuousAutoExposure tries to force you to do something sane, which is limiting the exposure duration to 1/30s. I have confirmed with exposureTargetOffset that the exposure level is far below its target. How can I force iOS to use longer exposures without implementing my own autoexposure algorithm?
Sep ’23