是否有任何 FFMPEG 库有一种方法可以在不首先解码的情况下确定帧的帧类型(I、P 或 B)?

Do any of the FFMPEG libraries have a method for determining the frame type (I, P or B) of a frame WITHOUT first decoding?

每隔一段时间就会出现这种情况,我一直找不到好的解决方案,但我想我会问专家:FFMPEG 中是否有一个视频帧解析器可以确定帧类型而无需诉诸解码?

每个编解码器都有其特定的语法,解码器是可以使用该语法的定制组件。现在,有没有一种操作模式,解码器可以在不输入代码路径的情况下分析和记录有效载荷的表面级参数来生成光栅?一般来说,没有。

有一个-debug选项(http://www.ffmpeg.org/ffmpeg-all.html#Codec-Options), which when set, certain decoders, mainly the native MPEG decoders, will log some metadata, but this will invoke the decoder. For modern codecs, there's the trace_headers bitstream filter可以在streamcopy模式下使用。这将解析并打印所有参数集和切片headers。您可以将这些转储到归档并检查它们。