我正在用动作脚本中的视频做东西,我需要寻找一个视频来确定帧。根据参考资料,使用 NetStream.seek 我只能寻找最近的 k 帧:
Seeks the keyframe (also called an I-frame in the video industry) closest to the specified location. The keyframe is placed at an offset, in seconds, from the beginning of the stream.
Video streams are usually encoded with two types of frames, keyframes (or I-frames) and P-frames. A keyframe contains an entire image, while a P-frame is an interim frame that provides additional video information between keyframes. A video stream typically has a keyframe every 10-50 frames.
所以我需要了解以 .f4v 格式编码的视频中有多少 p 帧和 i 帧。
我在mac和ubuntu上,我不关心要使用的工具(也许一些ffmpeg/mencoder调用应该是完美的),有什么建议吗?