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

Ohad Regev picture Ohad Regev · Dec 26, 2012 · Viewed 17.8k times · Source

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 wish to be able to get the number of Frames Per Second captured and preferably to be able to set it.

Any idea how to do that?

Answer

MouseCrasher picture MouseCrasher · May 26, 2016

AVCaptureConnection's videoMinFrameDuration is deprecated.

You can use AVCaptureDevice properties to detect supported video frame rate ranges and can assign minimum and maximum frame rates using properties.

device.activeFormat.videoSupportedFrameRateRanges return all video frame rates ranges supported by device.

device.activeVideoMinFrameDuration and device.activeVideoMaxFrameDuration can be used for specifying frame durations.