I just want to get frames(bitmap) from a video in android.
Just like a method:
MediaCodecUtil.getFrameAt(long timeUs,Object otherParams);
I have query some blog,And I found MediaCodec
is a good choose to do that.
but,how to do?Anyone help?
答案 0 :(得分:0)
我认为最简单的方法是使用MediaPlayer并将其输出Surface设置为ImageReader的Surface。
MediaPlayer将解析视频文件,搜索相关帧,并为您解码。