How to determine a video file's framerate with MediaCodec, MediaExtractor or MediaMetadataRetriever?

前端 未结 3 1620
南笙
南笙 2021-01-14 03:19

How to I extract the frame rate of a recorded video file? I know that there is MediaFormat.KEY_FRAME_RATE and that I can access MediaFormat objects through MediaExtractor. H

3条回答
  •  Happy的楠姐
    2021-01-14 04:00

    It looks like there is no way to get framerate through any of official API functions. It might require some extra logic - count times between timestamps or to parse headers info. in general h.264 standard allows variable framerate, so frame times could differ from one to one. for example if can show some static picture for several seconds or so

提交回复
热议问题