I want to crop the video given the lenght and width and x and y coordinates and it seems its not at possible with avmutablecomposition so I am planning to use AVAssetWriter
to crop video using its aspectFill property in video setting.
BUT MY QUESTION is can we use AVAssetWriter
as a replacement for AVExportSession
??
If yes, how to initialise the AVAssetWriterInput
with AVAsset
object as that we do in AVExportSession
,Like this
[[AVAssetExportSession alloc] initWithAsset:videoAsset presetName:AVAssetExportPresetHighestQuality];
It's possible that what you are looking for is AVMutableComposition naturalSize property which from what it looks from here, allows scaling (not cropping) of the video to wished sizes.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.