AVAssetImageGenerator fails to generate image for video

Originator:alex
Number:rdar://20568768 Date Originated:16/4/2015
Status:Open Resolved:
Product:iOS SDK Product Version:
Classification: Reproducible:Sometimes
 
Summary:
After writing video files using using AVAssetWriter, sometimes no image can be generated from the resulting video file when using AVAssetImageGenerator.

Steps to Reproduce:
1. Open project containing sample video
2. Run sample project
3. Observe error when trying to create a snapshot

Expected Results:
An image is generated at time = 0.

Actual Results:
No image is generated and a "Cannot open" error is returned.

Version:
iOS 8.3

Notes:
OS X 10.10.3 doesn't show a snapshot of the video file, either. I assume that it uses the same method to generate.

ffmpeg has no problem generating a screenshot at time = 0 by using the following on the command line: 

`ffmpeg -ss 00:00:00 -i Video.mp4 -f mjpeg screen.png`

Configuration:
iPhone 6

Attachments:
'AVAssetImageGeneratorBug.zip' was successfully uploaded.

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!