[Libav-user] Fastest possible stream parsing

Tocy zyvj at qq.com
Thu Feb 28 10:32:45 CET 2013


i think you can consider av_parser_parse2 function

 

 ------------------ Original ------------------
  From:  "Robert Krüger"<krueger at lesspain.de>;
 Date:  Thu, Feb 28, 2013 05:27 PM
 To:  "This list is about using libavcodec, libavformat, libavutil,libavdevice and libavfilter."<libav-user at ffmpeg.org>; 
 
 Subject:  [Libav-user] Fastest possible stream parsing

 

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
_______________________________________________
Libav-user mailing list
Libav-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130228/b06e3cad/attachment.html>


More information about the Libav-user mailing list