[FFmpeg-devel] strange seek problem matroska and avcodec_flush_buffers
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Sun Feb 19 19:08:20 CET 2012
On Sun, Feb 19, 2012 at 12:43:32PM -0500, Don Moir wrote:
> >Reimar Döffinger wrote:
> >
> >If you really wanted to you probably could hack error concealment to
> >do something better than substituting a plain gray for missing
> >references (in this and probably many other cases, just a darker
> >gray seems like it would look nicer).
> >
> >Thus MPlayer instructs FFmpeg to _not_ discard any initial
> >non-keyframes (or in this case frames before the intra refresh
> >interval passed) by setting CODEC_FLAG2_SHOW_ALL
>
> By setting CODEC_FLAG2_SHOW_ALL you get a quicker clean new frame
> even though you will get some distortion prior to this. That is
> quicker than not setting CODEC_FLAG2_SHOW_ALL and waiting on a new
> frame.
>
> Is there a way to detect when error concealment is complete ? This I
> think would be quite useful if this makes sense. It seems to since
> you do get a quicker clean new frame by setting
> CODEC_FLAG2_SHOW_ALL.
Error concealment only applies to the case where the decoder knows
for sure something is wrong.
In the intra refresh case there is usually a large number of frames
where the decoder cannot reasonably know whether something is still
off or not in the resulting frame, you basically have to rely on
information from the encoder (SEI NAL).
With a perfect encoder I think that would actually always give the
exact number of frames, so I don't think you can do better than
what FFmpeg always does.
More information about the ffmpeg-devel
mailing list