Skip to content

Instantly share code, notes, and snippets.

@preble
Last active December 6, 2017 22:55
Show Gist options
  • Save preble/04550c066bbe1ca441f912ccb5c6715f to your computer and use it in GitHub Desktop.
Save preble/04550c066bbe1ca441f912ccb5c6715f to your computer and use it in GitHub Desktop.

Was getting the following errors when calling AVAssetImageGenerator generateCGImagesAsynchronously. The stream in question was an HLS stream. When I switched to using the AVURLAsset of an MP4, the error disappeared.

With Apple-supplied HLS stream:

Error Domain=AVFoundationErrorDomain Code=-11819 "Cannot Complete Action" UserInfo={NSLocalizedRecoverySuggestion=Try again later., NSLocalizedDescription=Cannot Complete Action, NSUnderlyingError=0x1c0057850 {Error Domain=NSOSStatusErrorDomain Code=-12178 "(null)"}}

With another HLS stream generated by a video hosting provider:

Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-12436), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x1c4a57e20 {Error Domain=NSOSStatusErrorDomain Code=-12436 "(null)"}}

And another, the source of which I cannot recall, but likely a permutation of the above:

Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-12782), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x1c084ad70 {Error Domain=NSOSStatusErrorDomain Code=-12782 "(null)"}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment