justsoft / video_thumbnail

This plugin generates thumbnail from video file or URL. It returns image in memory or writes into a file. It offers rich options to control the image format, resolution and quality. Supports iOS and Android.
MIT License
183 stars 238 forks source link

ios: couldn't generate thumbnail, error:Error Domain=AVFoundationErrorDomain Code=-11832 "Cannot Open" #99

Closed Abilash0303 closed 2 years ago

Abilash0303 commented 2 years ago

Im using the plugin for creating video thumbnail in both Android and Ios, In Android it works pretty well, but while running same code in IOS i got such error, which i didn't get a solution for this

couldn't generate thumbnail, error:Error Domain=AVFoundationErrorDomain Code=-11832 "Cannot Open" UserInfo={NSLocalizedFailureReason=This media cannot be used., NSLocalizedDescription=Cannot Open, NSUnderlyingError=0x280122280 {Error Domain=NSOSStatusErrorDomain Code=-12431 "(null)"}}
[VERBOSE-2:ui_dart_state.cc(209)] Unhandled Exception: PlatformException(IO Error, Failed to write data to file, null, null)
#0      StandardMethodCodec.decodeEnvelope
package:flutter/…/services/message_codecs.dart:607
#1      MethodChannel._invokeMethod
package:flutter/…/services/platform_channel.dart:177
<asynchronous suspension>
#2      VideoThumbnail.thumbnailFile
package:video_thumbnail/video_thumbnail.dart:44
<asynchronous suspension>
ymedero90 commented 2 years ago

couldn't generate thumbnail, error:Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-16156), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x2818ac0c0 {Error Domain=NSOSStatusErrorDomain Code=-16156 "(null)"}}

justsoft commented 2 years ago

Check your iOS App has the write permission for the folder. Also please try the new 0.5.0 version, Thanks.

haozi5460 commented 2 years ago

0.5.0 also error to generate thumbnail

couldn't generate thumbnail, error:Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-16156), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x2830dc6c0 {Error Domain=NSOSStatusErrorDomain Code=-16156 "(null)"}}

justsoft commented 2 years ago

Could you open the iOS log console to get more detail error info? Please try: 1) Create the thumbnails in memory instead of writing in a file 2) A different image format