Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Taking first frame of video as thumbnail in android?

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

like image 494
Karthi Avatar asked Mar 09 '11 12:03

Karthi


People also ask

Which tool is used to display the thumbnail of a Video in Android?

Which tool is used to display the thumbnail of a video in Android? Many of the application are using the Glide library for loading the Image and Video thumbnail. You can download the Glide Library from here and alternatively, you can include the library directly in your app using Gradle.


1 Answers

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.

like image 100
Matthew Willis Avatar answered Sep 19 '22 19:09

Matthew Willis