mrityunjay kumar
mrityunjay kumar

Reputation: 66

exportAsynchronouslyWithCompletionHandler: is not working

I am creating clip of video and exporting it to new file in document directory. It works fine for half of the total duration of video. But if i chose clip time in latter half, it does not execute [export exportAsynchronouslyWithCompletionHandler::^{}];

After some time it gives error message MP AVAudioSessionDelegateMediaPlayerOnly end interruption. Interruptor category resumable <0>, _state = 0

I am not able to figure out why it is behaving this way. Similar way if i am editing audio file, it works fine for both half. Any help will be appreciated.

Upvotes: 0

Views: 2762

Answers (2)

Arnlee Vizcayno
Arnlee Vizcayno

Reputation: 2426

You might also take a look in this thread: https://stackoverflow.com/a/9524291/1179680

with this code:

  [exportSession exportAsynchronouslyWithCompletionHandler:^(void) 
   {
     dispatch_async(dispatch_get_main_queue(), ^{
     NSLog(@"Export Complete %d %@", exportSession.status, exportSession.error);
    });

  }];

As for me without that dispatch_async i can't get it work in iOS 5.0.1 but it works fine in iOS 6.0, just add that dispatch_async line to be sure your running on the a right thread.

Upvotes: 2

mrityunjay kumar
mrityunjay kumar

Reputation: 66

The clip duration was not selected properly. Video clip was selecting end time more than duration. It worked fine after correcting the time selection.

Upvotes: 1

Related Questions