[FFmpeg-devel] mpegts seek problems
donmoir at comcast.net
Tue Feb 21 01:35:08 CET 2012
I have about 10 mpegts files and all of them will display some distortion when using CODEC_FLAG2_SHOW_ALL. I assume all the mpegts files have this problem.
I am just using CODEC_FLAG2_SHOW_ALL because it gives me a quick visual of the problem. If you don't use this flag, then you will get a delay in the animation.
Mostly the delay or distortion is minor and can live with that, but in some cases it's pretty bad.
Depending on what you use to test seeking, the results will vary and in some cases it may not look like anything is wrong but there is and sometimes bad..
Nothing I have gets all the files right, but some of them play ok.
It seems to me that the mpegts demuxer (libavformat/mpegts.c) just has bad mangagement of it's keyframes but there are probably other problems.
In the function "mpegts_get_dts"' (this is it's read_timestamp function), it will call av_add_index_entry to add it's indices, but there is a "FIXME keyframe?" next to that.
It appears to me that if it can detect where a problem will occur, (because you get a delay or error concealment), it should not be adding keyframes that would land you in the middle of a delay or distortion when doing a seek.
Before I open a ticket on it and put up file samples, I would like to hear your comments please.
More information about the ffmpeg-devel