[FFmpeg-user] How to get encoded AVPackets in display order?
unga888 at yahoo.com
Tue Jun 12 17:23:10 CEST 2012
> From: Mike Scheutzow <mike.scheutzow at alcatel-lucent.com>
> To: FFmpeg user questions and RTFMs <ffmpeg-user at ffmpeg.org>
> Sent: Monday, June 11, 2012 1:17 PM
> Subject: Re: [FFmpeg-user] How to get encoded AVPackets in display order?
> Unga wrote:
>> Hi all
>> The documentation for the avcodec_encode_video2() says:
>> "The output packet does not necessarily contain data for the most
> recent frame, as encoders can delay and reorder input frames internally as
>> I'm interested getting output AVPackets in display order, that is, same
> input order as input AVFrames.
>> What are my options for achieving that?
> The answer is codec specific.
> If you are using one of the mpeg-style encoders, set 'number of B
> frames' to 0 i.e. -bf 0
Thank you very much all who reply on this subject.
I think probably I should let the encoding untouched.
Btw, what is this AVCodecContext.real_pict_num? Is this the real input picture number of the just returned encoded data from avcodec_encode_video2()?
I cannot try this, my machine crashed. I'm currently reinstalling the OS (FreeBSD 9), it may take few days as compiling from source.
More information about the ffmpeg-user