I am writing a MOV file using AVFoundation but they are not able to figure out how to resize the video. I have the videoGravity property captureVideoPreviewLayer set to AVLayerVideoGravityResizeAspectFill , and the UIView showing the preview layer has its own dimensions (not the same aspect ratio of the screen).
Recording works fine, but the dimensions of the recorded video are the same as the aspect ratio of the screen. How can I record with aspect ratio of UIView or preview level?
source share