StoragePath icon indicating copy to clipboard operation
StoragePath copied to clipboard

Video thumbnail is not available

Open webaddicted opened this issue 5 years ago • 3 comments

When i get all video then only video path is available in json, but video thumbnail is not available. Please add a one more field for thumbnail.

webaddicted avatar Nov 27 '20 13:11 webaddicted

Generate video thumbnails from this package video_thumbnail: ^0.2.5

Below function will work with storage_path output file paths

Future<dynamic> generateThumb(String videoPath) async {
    try {
      var thumb = await VideoThumbnail.thumbnailData(
        video: videoPath,
        maxWidth: 128,
        quality: 25,
        maxHeight: 128,
        imageFormat: ImageFormat.JPEG
      );
      return thumb;
    }catch(e){
      print(e);
      return null;
    }
  }

prkindia avatar Dec 05 '20 09:12 prkindia

why do i do same thing twice if i want to make a efficient app i need to get video and as well as audio thumbnails and need to run this task in a background thread can anyone do this please do if you can

faisalansari0367 avatar Feb 09 '21 09:02 faisalansari0367

why do i do same thing twice if i want to make a efficient app i need to get video and as well as audio thumbnails and need to run this task in a background thread can anyone do this please do if you can

Please refer to background processes in flutter, or you can build a cache of the generated thumbnails and store, update according to the list of files.

prkindia avatar Feb 16 '21 07:02 prkindia