jonataslaw / VideoCompress

Compress videos, remove audio, manipulate thumbnails, and make your video compatible with all platforms through this lightweight and efficient library.
MIT License
228 stars 267 forks source link

getFileThumbnail is not working after compressVideo in Android API 30 #160

Open ryota47 opened 2 years ago

ryota47 commented 2 years ago

I got this error when getFileThumbnail after compressVideo. the video was from the gallery with image_picker!

Null check operator used on a null value

I don't know why catching this error.

swapnilsinha17 commented 2 years ago

i also get the same issue

jpetro416 commented 2 years ago

I would catch the error like this and try to investigate image_picker first:

 XFile? video_take =
            await _imagePicker.pickVideo(source: ImageSource.camera,preferredCameraDevice: CameraDevice.rear,maxDuration: Duration(minutes: 1));
            if (video_take != null) { 
             //works
           }else{
           print("video_take is null")
            }