その上にアニメーション化された画像を含むビデオファイルを作成しています。エクスポートの進行状況とステータスを追跡していますが、エクスポートの進行状況が 1.0 に達した後、完了コールバックは呼び出されず、エクスポート ステータスは「AVAssetExportSessionStatusExporting」のままです。
AVAssetExportSession *exportSession = [[AVAssetExportSession alloc] initWithAsset:movieAsset presetName:AVAssetExportPresetMediumQuality];
self.session = exportSession;
[exportSession release];
session.videoComposition = self.videoComposition;
NSString *filePath = NSTemporaryDirectory();
NSString *fileName = [[@"Output_" stringByAppendingString:number] stringByAppendingString:@".mov"];
filePath = [filePath stringByAppendingPathComponent:fileName];
if ([[NSFileManager defaultManager] fileExistsAtPath:filePath]) {
[[NSFileManager defaultManager] removeItemAtPath:filePath error:nil];
}
session.fileLengthLimit = 1024 * 1024 * 10;
session.outputURL = [NSURL fileURLWithPath:filePath];
session.outputFileType = AVFileTypeQuickTimeMovie;
[session exportAsynchronouslyWithCompletionHandler:^{
dispatch_async(dispatch_get_main_queue(), ^{
[self exportDidFinish];
});
}];
実際には、読み取り不能な出力ファイルを作成しています。私が見たいのはエラー メッセージですがerror
、エクスポート セッションのプロパティは空のままです。