#pragma mark - mp4轉(zhuǎn)mov
+ (void)mp4ChangeMovInMp4File:(NSURL*)mp4Fle block:(void(^)(NSURL*file))block
{
//? ? NSURL *input = [self getSandxAddressUrl:mp4Fle];
? ? AVURLAsset *avAsset = [AVURLAsset URLAssetWithURL:mp4Fle options:nil];
? ? NSArray *compatiblePresets = [AVAssetExportSession exportPresetsCompatibleWithAsset:avAsset];
? ? if ([compatiblePresets containsObject:AVAssetExportPresetMediumQuality]) {
? ? ? ? AVAssetExportSession *exportSession = [[AVAssetExportSession alloc] initWithAsset:avAsset presetName:AVAssetExportPresetMediumQuality];
? ? ? ? NSString *str = [NSString stringWithFormat:@"movie.mov"];
? ? ? ? if ([[NSFileManager defaultManager]fileExistsAtPath:[self getSandxAdressInfile:str]]) {
? ? ? ? ? ? [[NSFileManager defaultManager] removeItemAtPath:[self getSandxAdressInfile:str] error:nil];
? ? ? ? }
? ? ? ? exportSession.outputURL= [selfgetSandxAddressUrl:str];
? ? ? ? exportSession.outputFileType = @"com.apple.quicktime-movie";
? ? ? ? exportSession.shouldOptimizeForNetworkUse = YES;
? ? ? ? [exportSessionexportAsynchronouslyWithCompletionHandler:^(void){
?? ? ? ? ? ? if (exportSession.status == AVAssetExportSessionStatusCompleted) {
?? ? ? ? ? ? ? ? block(exportSession.outputURL);
?? ? ? ? ? ? }else if (exportSession.status == AVAssetExportSessionStatusFailed){
?? ? ? ? ? ? ? ? NSLog(@"mp4轉(zhuǎn)mov失敗%@",exportSession.error);
?? ? ? ? ? ? ? ? block(nil);
?? ? ? ? ? ? }
?? ? ? ? }];
? ? }
}