How to achieve video stabilization (smoothness) in AVCaptureSession similar to the experience of video capture in IOS Camera app?

I'm trying to build an app that also has video capture/recording in-build. I'm using AVCaptureSession for video recording and tried various preset and stabilizationMode but nothing got me the smoothness that comes along with the iOS camera app video recording. The preview layer I see is similar to the camera preview in the photo mode of iOS camera app but nowhere close to the preview layer of the video mode of iOS camera app.

I used stabilizationMode as below but to no effect.

if (connection?.isVideoStabilizationSupported)! {

connection?.preferredVideoStabilizationMode = AVCaptureVideoStabilizationMode.cinematicExtended

}


Not sure what I'm doing wrong. Any help will be much appreciated.


Thanks,

Venkat

I think your photomode was using PhotoPreset like the system camera and it actually do not support Stabilization so it looks like very smooth and video mode was using cinematicExtended and it did will cause some lags. I will suggest using AVCaptureVideoStabilizationModeStandard and it should be the same as system camera

How to achieve video stabilization (smoothness) in AVCaptureSession similar to the experience of video capture in IOS Camera app?
 
 
Q