【问题标题】:How can I get original volume of compressed video in iOS 6如何在 iOS 6 中获取压缩视频的原始音量
【发布时间】:2013-02-18 07:40:16
【问题描述】:

我正在使用下面的代码来压缩视频。

- (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);

         }

     }];

}

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

【问题讨论】:

    标签: iphone objective-c ios6 mpmovieplayercontroller avfoundation


    【解决方案1】:

    iOS 6 中存在一些声音问题。希望下面的 URL 可以帮助到您。

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

    【讨论】:

      猜你喜欢
      • 2018-05-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-07-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多