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

John Donaghy johnfdonaghy at gmail.com
Sun Feb 18 23:24:07 CET 2007


>
> 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
so, I've tried that and it works some of the time. I have a couple of
samples where the av sync is out right from the start with that approach
though. If  no other approach is going to be accepted I could experiment
with it to see if I've done something wrong.

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?

If not, then one other approach could be to read ahead in the video stream
until the first I frame and get the pts and it's frame number. Then I could
throw away those frames and reread the video stream and be able to apply pts
values right from the start that matched up with those in the file.

Suggestions appreciated.

Thanks,

John



More information about the MPlayer-dev-eng mailing list