iOS AVCaptureSession - How to get/set the number of frames per second recorded?

后端 未结 4 1615
梦如初夏
梦如初夏 2021-02-04 05:29

I\'m new to AVCaptureSession and wish to better understand how to work with it. So I managed capturing the video stream as separated CIImages and convert them to UIImages. Now I

4条回答
  •  借酒劲吻你
    2021-02-04 06:01

    Do it like this

    if let frameSupportRange = currentCamera.activeFormat.videoSupportedFrameRateRanges.first {
        captureSession.beginConfiguration()
        // currentCamera.activeVideoMinFrameDuration = CMTimeMake(1, Int32(frameSupportRange.maxFrameRate))
        currentCamera.activeVideoMinFrameDuration = CMTimeMake(1, YOUR_FPS_RATE)
        captureSession.commitConfiguration()
    }
    

提交回复
热议问题