how to get frames of video file in android

被刻印的时光 ゝ 提交于 2019-12-17 17:13:19

问题


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 sections

delete selected sections

copy selected sections

cut selected sections

paste into the head

paste into the tail


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/10071408/how-to-get-frames-of-video-file-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!