V-Xtreme
V-Xtreme

Reputation: 7323

ThumbnailUtils.createVideoThumbnail returning null bitmap

I want to create thumbnail from the video . I am selecting video from the gallery , after selection its returning me the following path :

file:///mnt/sdcard/demo.mp4

I am giving this path as a input of createVideoThumbnail method like :

 bitmap =  ThumbnailUtils.createVideoThumbnail(path, MediaStore.Images.Thumbnails.MICRO_KIND);

but each time it is returning me NULL bitmap with exception .There some question on SO same as this but those did not work for me . can anybody help me ?

Upvotes: 1

Views: 2473

Answers (1)

KunalK
KunalK

Reputation: 1904

It seems the issue is with the filePath that you are passing, may be you should try by passing the absoulute path of that file.

Upvotes: 1

Related Questions