Is there a way to get the total number of video fr

2019-07-19 14:47发布

I am currently extracting, decoding, editing and re-encoding a video on Android using MediaCodec and MediaExtractor on Android. In the course of this process I would like to give users some information on the progress. I am already counting how many frames were extracted, decoded and encoded. In order to compute a percentage and to show users how far the process is, I would need the total number of frames in the original stream. However, I am unable to find a method in the MediaExtractor.

Does anybody know how I can get the total number of frames in a video before I start extracting?

1条回答
不美不萌又怎样
2楼-- · 2019-07-19 15:30

you can use total video duration and current frame timestamp to show the progress

no API for total frames is available in MediaExtractor

查看更多
登录 后发表回答