Combining videos using AVAssetExportSession with AVAssetExportPresetPassthrough

Originator:chad515
Number:rdar://10421720 Date Originated:11/9/2011
Status:Open Resolved:No
Product:Mac OS X Product Version:10.7.2
Classification:Serious Bug Reproducible:Always
 
Summary:
In trying to transition from QTKit to AVFoundation on Lion, I cannot seem to concatenate QuickTime movie files containing h.264 video when using AVAssetExportSession with the AVAssetExportPresetPassthrough preset. It seems to work fine if the source files are AAC audio only, but files with h.264 video as well fail to export.

Steps to Reproduce:
1) Create 2 or more .mov files with h.264 video, AAC audio. Make sure they use the exact same settings (in my case they're from a single AVCaptureSession in which I just switched files mid-way through).
2) Create an AVMutableComposition
3) Create an AVURLAsset from the first .mov file and insert it into the AVMutableComposition
4) Create an AVURLAsset from the second .mov file and insert it into the AVMutableComposition at the end
5) Create a AVAssetExportSession with the AVAssetExportPresetPassthrough preset and the AVMutableComposition
6) Export the combined video

Expected Results:
The video is exported.

Actual Results:
The export fails with status AVAssetExportSessionStatusFailed. Querying the error property yields:
Error Domain=AVFoundationErrorDomain Code=-11820 "Cannot Complete Export" UserInfo=0x103122940 {NSLocalizedDescription=Cannot Complete Export, NSLocalizedRecoverySuggestion=Try exporting again.


Regression:
N/A

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!