My sdcard video folder contains number of .mp4 video files. According to my requirement I want to list down those video files in my android application listview with their "Thumbnail" and "Name". BTW I plan to use Picasso or Universal image loader for image caching. Please tell me anyone know how to do?
Asked
Active
Viewed 816 times
0
-
Check out this one :[Android Video Thumbnail](http://stackoverflow.com/questions/1334694/android-is-it-possible-to-display-video-thumbnails) – Bharatesh Mar 18 '15 at 08:19
1 Answers
0
import android.provider.MediaStore.Video.Thumbnails;
You can get two preview thumbnail sizes from the video:
Thumbnails.MICRO_KIND for 96 x 96
Thumbnails.MINI_KIND for 512 x 384 px
use this code
String filePath = "/sdcard/DCIM/Camera/my_video.mp4"; //change the location of your file!
ImageView imageview_mini = (ImageView)findViewById(R.id.thumbnail_mini);
ImageView imageview_micro = (ImageView)findViewById(R.id.thumbnail_micro);
Bitmap bmThumbnail;
bmThumbnail = ThumbnailUtils.createVideoThumbnail(filePath, Thumbnails.MINI_KIND);
imageview_mini.setImageBitmap(bmThumbnail);
Check this link

Community
- 1
- 1

Amitabh Sarkar
- 1,281
- 1
- 13
- 26
-
1Yes I saw this but i'm expecting Picasso or Universal image loader base code and without using Bitmap objects. Like passing URI directly. – Dimal Govinnage Mar 18 '15 at 09:31