Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get original volume of compressed video in iOS 6

I am using below code to compress the video .

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

         }

     }];

}

after compression the video has very low sound in iOS6 but in iOS 5 I am getting full original volume, then how can I get original volume in iOS 6.

like image 341
Suresh Avatar asked Feb 18 '13 07:02

Suresh


1 Answers

There is some sound problem in iOS 6. Hope below URL can help you.

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

like image 73
Shashank Kulshrestha Avatar answered Oct 23 '22 14:10

Shashank Kulshrestha