6

I want to store the thumbnail image for video after the user start recording, because i want to use the only few video to list which is stored under specific instead of all video from sdcard.

If i want to shoe all video i got the thumbnails form MediaStore class, but i need for specific video i have to store the thumbnails separately for the particular video. Any suggest some idea to achieve this.

If it is possible tell me how to capture the surface View of camera to save it as bitmap image for use it as Thumbnails.

Thanks

Karthi
  • 13,624
  • 10
  • 53
  • 76

1 Answers1

6

The first frame can be taken using the NDK and ffmpeg, but it's more trouble than it's worth.

The simple way is to use ThumbnailUtils as per this answer, provided you are on android-8 (Froyo) or later.

Community
  • 1
  • 1
Matthew
  • 44,826
  • 10
  • 98
  • 87
  • 2
    This is long overdue, but this is not a correct answer. ThumbnailUtils does not get the first frame, it's a frame from the middle of the video. – Jacob Tabak Sep 11 '14 at 18:26
  • 1
    @Karthi - MediaMetadataRetriever is what you are looking for. – Debjit Jun 26 '17 at 04:04