[MPlayer-dev-eng] [PATCH] further dvr-ms playback improvements

Uoti Urpala uoti.urpala at pp1.inet.fi
Sun Sep 17 06:03:02 CEST 2006


On Sat, 2006-09-16 at 20:54 -0500, John Donaghy wrote:
> > You should change the pts values
> > returned by the demuxer rather than changing other code to work around
> > them.
> 
> The pts values in a dvr-ms file are inaccurate - this is not a problem
> with the demuxer code. It is just the way it is in those files - the
> pts values are fine in wmv files afaik. I actually suspect this is on
> purpose to make it difficult for non M$ software to play the format.

The demuxer should return pts values that the rest of the program can
use to time the frames. If the pts values stored directly in the file
are not suitable for that purpose then the demuxer should not return
them.

> As far as I can tell there is no other way than to use the framerate.
> I'm at a loss here unless you have any suggestions. Maybe some way of
> interpolating the pts values to make them more accurate or something?
> I've no idea how to do that though.

You can use the framerate in the demuxer, either always returning
previous_pts+frame_time as the pts of the next frame or with some kind
of adjustment towards the stored pts (if that is needed for some files).
Note that your earlier patch would have resulted in the frame being
shown simultaneously with a particular point in audio and so would have
given it an effective pts, except in that case the pts values would have
depended on the user's sync options and probably behaved in some
undesirable ways. You can do better by explicitly choosing the pts
values in the demuxer.




More information about the MPlayer-dev-eng mailing list