问题描述
如何我提取记录的视频文件的帧速率?我知道有MediaFormat.KEY_FRAME_RATE而且我可以通过MediaExtractor访问MediaFormat对象。然而KEY_FRAME_RATE仅适用于连接codeRS。相反,我想找出一个已经录制的视频的帧速率。
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. However KEY_FRAME_RATE is only available for encoders. Instead I want to find out the frame rate of an already recorded video.
任何想法?
推荐答案
它看起来像有没有办法通过任何官方的API函数来获取帧率。它可能需要一些额外的逻辑 - 时间戳之间计数的时间或解析头信息。一般H.264标准允许可变帧率,因此帧时间可能有所不同,从一比一。例如,如果可以显示一些静态的图片几秒钟左右。
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
这篇关于如何确定一个视频文件的帧速率与媒体codeC,MediaExtractor或类MediaMetadataRetriever?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!