Taking the first frame of a thumbnail video in android?

I want to save a thumbnail for the video after the user starts recording, because I want to use only a few videos for the list, which is saved under a specific one, and not for the entire video from the SD card.

If I want to train all the videos, I got thumbnails from the MediaStore class, but I need to save thumbnails separately for a specific video for a specific video. Any suggestion for some ideas to achieve this.

If possible, tell me how to capture the surface. View of the camera to save it as a bitmap for use as thumbnails.

thanks

+4
source share
1 answer

The first frame can be used with NDK and ffmpeg, but this is more of a problem than it costs.

An easy way is to use ThumbnailUtils as per this answer if you are on android-8 (Froyo) or later.

+5
source

Source: https://habr.com/ru/post/1342988/


All Articles