how to get frames of video file in android

后端 未结 2 1913
青春惊慌失措
青春惊慌失措 2020-12-07 06:03

I want to get the frames of a video file to show in a gallery view in android. and how to edit frames, for example

Select frame sections

use selected section

相关标签:
2条回答
  • 2020-12-07 06:44

    You can use the MediaMetadataRetriever class. It has getFrameAt() method wherein you can specify the time of the frame that you want to get.

    For details refer to MediaMetadataRetriever

    0 讨论(0)
  • 2020-12-07 06:59

    Actually, MediaMetadataRetriever.getFrameAtTime uses microseconds as a parameter, not milliseconds. Once you make that change, you can get the correct frames from the video.

    0 讨论(0)
提交回复
热议问题