Notice in the // rotate to portrait
portion of the code they're making affine transformations. Modify those transformations to align the video how you want.
Crop video with AVFoundation
-
13-06-2023 - |
Question
I try to crop a video in square with AVFoundation which I follow the tutorial from this web site http://www.netwalk.be/article/record-square-video-ios.
My question is how to crop a square video with an area that I selected (like when you select a photo in UIImagePicker or like in instagram). The example gives me a square video but cropping from the center.
Thank you for your advice.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow