October 21, 2024
Chicago 12, Melborne City, USA
Android

ThumbnailUtils.createVideoThumbnail() can not get bitmap


I test many file formats for this, e.g. avi、flv、wmv…, but all of this get null bitmap:

String aviPath = "xxxx.avi";
Bitmap bitmap = ThumbnailUtils.createVideoThumbnail(aviPath, MediaStore.Images.Thumbnails.MINI_KIND);

and had log like this:
java.io.IOException: Failed to create thumbnail, can’t open xxx.avi。

Is it means that these file formats can’t be supported now? or using it wrong?



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video