rFlex / SCRecorder

iOS camera engine with Vine-like tap to record, animatable filters, slow motion, segments editing
Apache License 2.0
3.06k stars 583 forks source link

cut designated area.and the result direction is wrong #310

Open FlutterDown opened 8 years ago

FlutterDown commented 8 years ago

cut designated area

use SCAssetExportSession result is wrong, direction could rotate M_PI_2

SCAssetExportSession *exportSession = [[SCAssetExportSession alloc] initWithAsset:self.recordSession.assetRepresentingSegments]; exportSession.videoConfiguration.filter = currentFilter; exportSession.videoConfiguration.preset = SCPresetHighestQuality; exportSession.audioConfiguration.preset = SCPresetHighestQuality; exportSession.videoConfiguration.maxFrameRate = 35; exportSession.outputUrl = exportUrl; exportSession.outputFileType = AVFileTypeMPEG4; // exportSession.delegate = self; exportSession.contextType = SCContextTypeAuto;

exportSession.videoConfiguration.sizeAsSquare = YES;
exportSession.videoConfiguration.composition = [self getCpmposition];

but i use AVAssetExportSession . the result is right

self.exporter = [[AVAssetExportSession alloc] initWithAsset:asset presetName:AVAssetExportPresetHighestQuality] ;
self.exporter.videoComposition =  [self getCpmposition];
self.exporter.outputURL = exportUrl;
self.exporter.outputFileType = AVFileTypeQuickTimeMovie;

}