如何在iOS 6中获得原始压缩视频量

Sur*_*esh 6 iphone objective-c mpmovieplayercontroller avfoundation ios6

我使用下面的代码来压缩视频.

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

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

    [exportSession exportAsynchronouslyWithCompletionHandler:^(void)
     {

         if (exportSession.status == AVAssetExportSessionStatusCompleted)
         {

             printf("completed\n");
             NSLog(@"outputurl is %@",outputURL);

         }
         else
         {
             printf("error\n");
             NSLog(@"error is %@",exportSession.error);

         }

     }];

}
Run Code Online (Sandbox Code Playgroud)

在压缩后,视频在iOS6中的声音非常低,但在iOS 5中我获得了完整的原始音量,那么我如何在iOS 6中获得原始音量.

Sha*_*tha 1

iOS 6 出现一些声音问题。希望以下网址可以帮助您。

https://discussions.apple.com/thread/4339660?start=90&tstart=0