Open ritvij14 opened 2 years ago
The error "Couldn't generate thumbnail, error:Error Domain=AVFoundationErrorDomain Code=-11800" usually indicates that there is an issue with generating a thumbnail image for a video file. This can be caused by a variety of factors, such as a corrupt or unsupported video file, an issue with the device or operating system, or a problem with the code that is generating the thumbnail.
Here are a few things you can try to fix this issue:
Check the video file: Make sure the video file is not corrupt and is in a supported format. You can try playing the video file on a different device or in a different player to see if the issue is with the file itself.
Check the device and operating system: Make sure the device and operating system you are using are compatible with the video file and the code that is generating the thumbnail. You may need to update the device or operating system to the latest version to fix any compatibility issues.
Check the code: Make sure the code that is generating the thumbnail is correct and is not causing any errors. You can use the Flutter debugger or print statements to debug the code and see where the issue is occurring.
Check for permissions: Make sure you have the necessary permissions to access the video file and generate the thumbnail. On iOS, you may need to add the NSPhotoLibraryUsageDescription key to your app's Info.plist file to request access to the photo library.
^ If this isn't a ChatGPT response, then I don't know what is hahaah
Hi, I have the same problem on iOS:
couldn't generate thumbnail, error:Error Domain=AVFoundationErrorDomain Code=-11832 "Cannot Open" UserInfo={NSLocalizedFailureReason=This media cannot be used., NSLocalizedDescription=Cannot Open, NSUnderlyingError=0x282f15440 {Error Domain=NSOSStatusErrorDomain Code=-12431 "(null)"}}
Any updates on the problem?
I'm using the video_thumbnail: ^0.5.3
flutter package.
Here is my code:
Future<Uint8List?> generateThumbnail(String videoUrl) async {
try {
final thumbnail = await VideoThumbnail.thumbnailData(video: 'https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_30mb.mp4');
return thumbnail;
} catch (e) {
if (kDebugMode) {
print('Error generating thumbnail: $e');
}
return null;
}
}
I'm trying to load a list of thumbnails (even from the same URL), but on old IOS devices most of them are not loaded, and I'm getting the above error.
couldn't generate thumbnail, error:Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-12792), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x283be6730 {Error Domain=NSOSStatusErrorDomain Code=-12792 "(null)"}}
Important key points:
Any updates?
Comment strings where imgGenerator.requestedTimeToleranceBefore
and imgGenerator.requestedTimeToleranceBefore
variables are set in your VideoThumbnailPlugin.m file from flutter pub sources. In my case this file is located in /Users/my_user/.pub-cache/hosted/pub.dev/video_thumbnail-
Hi, I have the same problem on iOS:
couldn't generate thumbnail, error:Error Domain=AVFoundationErrorDomain Code=-11832 "Cannot Open" UserInfo={NSLocalizedFailureReason=This media cannot be used., NSLocalizedDescription=Cannot Open, NSUnderlyingError=0x282f15440 {Error Domain=NSOSStatusErrorDomain Code=-12431 "(null)"}}
Any updates on the problem?
Did u resolve this?
Trying the above code to get the thumbnail of a video stored in firebase whose URL is fetched from firestore.
Half of the times it works but rest of the times it fails, with the below error.