Recording Constant Frame Rate at 4K 60 fps mode

Hi, We have created an app which allows recording 4K 60 fps videos in the app. We have noted that some time the recording switched to 20 fps (the value 20 is constant) even though the resolution settings is at 4K 60fps. We are using AVCaptureDevice to invoke the camera.

has anyone experienced this problem before ? What is unique to 20 fps? Why does it resort to 20 fps from 60 fps and why not to other numbers ?

Two things to check:

  1. AVCaptureDevice lets you set a max frame rate (videoMinFrameDuration) and min frame rate (videoMaxFrameDuration). If you want a constant 60 fps, you need to set both to 1/60. Perhaps you only set the max frame rate, but left the min frame rate alone, and now the frame rate is floating down to 20 in low light to get better exposure.
  2. Make sure you do not have AVCaptureDevice.autoVideoFrameRateEnabled set to true. That feature automatically picks lower frame rates in low light to improve exposure.
Recording Constant Frame Rate at 4K 60 fps mode
 
 
Q