任务:将传单图像合并到传单视频中.
案例:
情况1
案例2
FAIL =错误域= AVFoundationErrorDomain代码= -11800"操作无法完成"UserInfo = 0x17266d40 {NSLocalizedDescription =操作无法完成,NSUnderlyingError = 0x172b3920"操作无法完成.(OSStatus错误-16980.) ",NSLocalizedFailureReason =发生未知错误(-16980)}
代码:
- (void)modifyVideo:(NSURL *)src destination:(NSURL *)dest crop:(CGRect)crop
scale:(CGFloat)scale overlay:(UIImage *)image
completion:(void (^)(NSInteger, NSError *))callback {
// Get a pointer to the asset
AVURLAsset* firstAsset = [AVURLAsset URLAssetWithURL:src options:nil];
// Make an instance of avmutablecomposition so that we can edit this asset:
AVMutableComposition* mixComposition = [AVMutableComposition composition];
// Add tracks to this …Run Code Online (Sandbox Code Playgroud)