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

Get video thumbnail from icloud video file, occurs an error #87

Closed mikeooye closed 2 years ago

mikeooye commented 2 years ago
    String? thumbnailPath;
    var tmpPath = (await getTemporaryDirectory()).path;
    try {
      thumbnailPath = await VideoThumbnail.thumbnailFile(
          video: this.path,
          imageFormat: ImageFormat.PNG,
          maxHeight: 280,
          maxWidth: 280,
          quality: 9,
          thumbnailPath: tmpPath);
    } catch (e) {
      Log.e('$path, $tmpPath, $e');
    }

The video path is: /private/var/mobile/Containers/Data/Application/D59FD25C-5C9B-4E71-9AE0-75E4A0793F69/tmp/cn.lanehub.talent-Inbox/乔治第一天上幼儿园.mp4

截屏2021-10-15 14 59 24
justsoft commented 2 years ago

Check the write permission.