Note that there are some explanatory texts on larger screens.

plurals
  1. POAVAssetExportSession stops progressing
    primarykey
    data
    text
    <p>I'm having a problem with AVAssetExportSession where the progress stops increasing but the status still says that it is exporting. This is actually a pretty rare occurrence, it works flawlessly about 99.99% of the time, but I want to fix the problem anyway.</p> <p>So I start the exporting:</p> <pre><code> exportSession = [[AVAssetExportSession alloc] initWithAsset:composition presetName:AVAssetExportPresetMediumQuality]; exportSession.videoComposition = videoComposition; exportSession.outputFileType = @"com.apple.quicktime-movie"; exportSession.outputURL = outputURL; [exportSession exportAsynchronouslyWithCompletionHandler:^{ ... }]; </code></pre> <p>Then have a timer checking the progress:</p> <pre><code> AVAssetExportSessionStatus status = [exportSession status]; float progress = 0; if (status == AVAssetExportSessionStatusExporting) { progress = [exportSession progress]; } else if (status == AVAssetExportSessionStatusCompleted) { progress = 1; } NSLog(@"%d %f", status, progress); [delegate processor:self didProgress:progress]; </code></pre> <p>And the output ends up looking like:</p> <pre><code>2012-05-23 14:28:59.494 **********[1899:707] 2 0.125991 2012-05-23 14:28:59.994 **********[1899:707] 2 0.185280 2012-05-23 14:29:00.494 **********[1899:707] 2 0.259393 2012-05-23 14:29:00.994 **********[1899:707] 2 0.326093 2012-05-23 14:29:01.494 **********[1899:707] 2 0.400206 2012-05-23 14:29:01.995 **********[1899:707] 2 0.481729 2012-05-23 14:29:02.495 **********[1899:707] 2 0.541019 2012-05-23 14:29:02.997 **********[1899:707] 2 0.622542 2012-05-23 14:29:03.493 **********[1899:707] 2 0.681832 2012-05-23 14:29:03.995 **********[1899:707] 2 0.763355 2012-05-23 14:29:04.494 **********[1899:707] 2 0.822645 2012-05-23 14:29:04.994 **********[1899:707] 2 0.880082 2012-05-23 14:29:05.493 **********[1899:707] 2 0.880082 2012-05-23 14:29:05.994 **********[1899:707] 2 0.880082 ... 2012-05-23 14:43:22.994 **********[1899:707] 2 0.880082 2012-05-23 14:43:23.493 **********[1899:707] 2 0.880082 2012-05-23 14:43:23.994 **********[1899:707] 2 0.880082 2012-05-23 14:43:24.494 **********[1899:707] 2 0.880082 </code></pre> <p>(Note: It doesn't stop at the same percentage every time, its totally random)</p> <p>As you can see from the timestamps it took 5 seconds to do the first 88%, and then I let it run for another 13 minutes (full video processing usually doesn't take more then 10 seconds) with no change in the progress.</p> <p>Currently my only option is to check if the progress hasn't changed in the last X seconds and just tell the user it failed and to try again.</p> <p>Anyone have any ideas?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload