0

I am playing with AVFoundation features to discover the camera features and trying to change shutter speed to take the photo in a longer time. For instance, I want to take the light for 1 second but I could not manage to find the way to do so.

Only thing that I can do is setting exposure value via setExposureModeCustomWithDuration:ISO:completionHandler: method, so that shutter speed also changes but it becomes 0.03 at most.

here is what I am doing;

    do {
        try captureDevice?.lockForConfiguration()
        captureDevice?.setExposureModeCustom(duration:  captureDevice?.activeMaxExposureDuration ?? CMTime.zero, iso: minISO)
        captureDevice?.unlockForConfiguration()
    } catch let err {
        print(err.localizedDescription)
    }

another way using func setExposureTargetBias(_ bias: Float) async -> CMTime method;

    do {
        try captureDevice?.lockForConfiguration()
        captureDevice?.setExposureTargetBias(captureDevice?.maxExposureTargetBias ?? 0)
        captureDevice?.unlockForConfiguration()
    } catch let err {
        print(err.localizedDescription)
    }

What is the proper way to change the shutter speed?

musakokcen
  • 359
  • 2
  • 12
  • Update your question with your attempt to use `setExposureModeCustom`. The following may be helpful: https://stackoverflow.com/questions/29819515/ios-camera-manual-exposure-duration-but-auto-iso – HangarRash Jun 25 '23 at 01:16

0 Answers0