[Libav-user] Fastest possible stream parsing

Robert Krüger krueger at lesspain.de
Thu Feb 28 10:27:26 CET 2013


Hi,

what is the fastest possible way to retrieve things like frame type
information with ffmpeg api? I would like to write code that does
things like
- retrieve frame type information (I,B,P) for an MPEG2 stream
- retrieve keyframe positions for H.264 (for formats that do not store
this info in the container or where no index is implemented in
libavformat)

The only thing I found was setting the two AVCodecContext fields
skip_idct and skip_loop_filter to AVDISCARD_ALL but the speed gains
were only around 5% in my tests, so I would assume there is still a
lot of decoding happening. Is there any way to suppress the actual
decoding of picture data and just parse e.g. a transport stream and
metadata in the bitstream with public API?

Thanks,

Robert


More information about the Libav-user mailing list