I am recording an MOV file using AVFoundation but im having trouble finding out how to change the dimensions of the video. I have videoGravity
property of captureVideoPreviewLayer
set to AVLayerVideoGravityResizeAspectFill
and the UIView
showing the preview layer has custom 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 the aspect ratio of the UIView or the preview layer?