sandrios / sandriosCamera

Easy integration of camera for image and video capturing with Image Picker.
MIT License
187 stars 54 forks source link

How can I get video thumbnail ? #35

Closed jatin-lakhani closed 6 years ago

yankelandroid commented 6 years ago

MediaMetadataRetriever mMMR = new MediaMetadataRetriever();

    mMMR.setDataSource(model.getPath());
    //api time unit is microseconds
    Bitmap bitmap = mMMR.getFrameAtTime(1 * 1000000, MediaMetadataRetriever.OPTION_CLOSEST_SYNC);