[MPlayer-dev-eng] Re: [PATCH] dvr-ms fixes for pts, key frame detection and seeking

Uoti Urpala uoti.urpala at pp1.inet.fi
Mon Feb 19 09:55:25 CET 2007


On Sun, 2007-02-18 at 16:24 -0600, John Donaghy wrote:
> >
> > Starting the pts from that of the first audio frame would at least be a
> > better guess. Are the sync issues caused by starting from 0 any worse
> > than with the video.c change? I think they should be the same...
> 
> 
> Do you mean start at zero and then adjust all pts values in the file
> downwards by the amount found in the first large one (roughly speaking)? If

I'm not sure what you're replying to, since it doesn't seem to match
either sentence you quoted... By the first sentence I meant starting
from the pts of adjacent audio packets. In the second sentence I meant
to ask about the start-from-zero version you already implemented vs
video.c change.

> However another approach might be to simply discard everything before the
> first video key frame because that always has a usable pts value in it. That
> way I could interpolate between I frames very easily since I can work out
> the framerate right at the start. Is it acceptable to start playback at the
> first I frame in the video stream?

Yes, if the stream starts with non-key frames those cannot be properly
decoded anyway. If all key frames always have a correct pts value and
known fps from the frame onwards that should allow generating sane
timestamps.





More information about the MPlayer-dev-eng mailing list