Square cropping and fixing the video orientation in iOS
问题 I am capturing the video using UIImagePickerController, i can crop the video using the following code, AVAsset *asset = [AVAsset assetWithURL:url]; //create an avassetrack with our asset AVAssetTrack *clipVideoTrack = [[asset tracksWithMediaType:AVMediaTypeVideo] objectAtIndex:0]; //create a video composition and preset some settings AVMutableVideoComposition* videoComposition = [AVMutableVideoComposition videoComposition]; videoComposition.frameDuration = CMTimeMake(1, 30); //here we are