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

John Donaghy johnfdonaghy at gmail.com
Thu Feb 8 18:02:53 CET 2007


>
> This sounds like a totally wrong approach. Aren't we talking about
> mpeg video here? In which case, the video codec has a nominal
> framerate stored in the video headers, which should be followed in the
> absence of container-level timestamps. Yes it's ugly for the demuxer
> to have to dig into codec-level data, but that's what you have to do
> when writing a demuxer for an incestuous container. It's just like for
> ogg/vorbis...



I dont understand why you think this is a wrong approach. The timestamps are
in the container. There are both the normal ASF timestamps, which sort of
work but give you AV sync issue among other things, and then there are the
dvr-ms specific timestamps which you pretty much have to use or else the AV
does not sync well especially with HD content. The timestamps in both
streams do not start at zero (I think because it's from a pvr app) so when
using the framerate from the codec I cant see any way to sync the audio and
video. (This is basically what happens in the libavformat asf demuxer and
the result is that AV sync for dvr-ms files is often way off for HD content)

There are two issues with these timestamps though:

1) in some samples they only appear on keyframes but, once you know the
average frametime, you can interpolate the in-between values and it works
perfectly
2) in most samples pts values appear in frame (ie non chronological) order
in which case -correct-pts works

The technique I've tested to get round the first issue also avoids the need
to use correct-pts for the second - which I think is a good thing.

Finally, I also discovered a way to determine the framstart from the dvr-ms
container alone so I will be able to submit a patch that removes all codec
specific code from the asf demuxer. I'd really hate to go in the opposite
direction at this point.

John



Rich
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>



More information about the MPlayer-dev-eng mailing list