2012-11-15 55 views

回答

0

這幫了我:

- (void)convertVideoToLowQuailtyWithInputURL:(NSURL*)inputURL 
           outputURL:(NSURL*)outputURL 
           handler:(void (^)(AVAssetExportSession*))handler 

{ 

AVURLAsset *asset = [AVURLAsset URLAssetWithURL:inputURL options:nil]; 
AVAssetExportSession *exportSession = [[AVAssetExportSession alloc] initWithAsset:asset presetName:AVAssetExportPresetMediumQuality]; 
exportSession.outputURL = outputURL; 
exportSession.outputFileType = AVFileTypeQuickTimeMovie; 

[exportSession exportAsynchronouslyWithCompletionHandler:^(void) 
{ 
    handler(exportSession); 
}]; 
}