[FFmpeg-devel] strange seek problem matroska and avcodec_flush_buffers

Don Moir donmoir at comcast.net
Sun Feb 19 18:03:36 CET 2012


Thanks for the explaination.


> On Sun, Feb 19, 2012 at 04:42:50AM -0500, Don Moir wrote:
>> The strange thing is, if I don't call avcodec_flush_buffers, the damn 
>> thing works almost perfect for me. Very clean actually, no distortion but 
>> a little frame flicker.
>
> That's probably just because the frames before and after are quite
> similar.
> 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).

The light gray does stick out too much and I also think a darker gray would 
be better.

> Now coming back to MPlayer just showing distortion:
> I extremely hate when players rather show nothing than something
> that might have minimal corruption.
> 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 I now see the same behavior as MPlayer 
although since my post seek process (exact timestamp) cleans it up abit it 
looks a little better.

The thing is, the "bad_seek_matroska_strange" file is a worst case of this 
of the files I have. Some other files I have, have a very slight indication 
of this. Maybe something like 1/8 to 1/4 of a second. In these cases, 
settting CODEC_FLAG2_SHOW_ALL is worse because you will see distortion where 
previously it was clean. While seeing the distortion is helpful in some 
cases, I have more files that are effected negatively by it.

I suppose this is the end of this outside of hacking error concealment ? 
Like I don't know if there is a way to make a better conscious decision on 
it. 



More information about the ffmpeg-devel mailing list