Log in

View Full Version : high frame PTS accuracy in DVD playbacks


rogerdpack
8th November 2011, 23:11
Hello all. Question.

I know DVD's have "NAV" packets every so often, basically with "the current timestamp" in them.

And I know that sometimes the underlying MPEG PTS time stamp "resets" mid-way through a DVD (sometimes at layer breaks, sometimes never, sometimes at chapter breaks, etc.)
My question is basically...is there any way to know the exact time for any given frame within a DVD, even between NAV packets? Like down to the millisecond, 1:01.05s or the like?

Especially if it's between NAV packets. Do you just have to just "interpolate" its actual timestamps based on the amount of MPEG time elapsed since the most recent NAV packet?

I'm guessing that basically DVD's don't provide fine grained precision of timestamps, so you have to just calculate it on your own?
Thanks!
-roger

Ghitulescu
9th November 2011, 09:04
It's of no practical use, the frames are anyway 33,3333 - 40 ms apart.

rogerdpack
9th November 2011, 15:40
It's of no practical use, the frames are anyway 33,3333 - 40 ms apart.

Thanks for the answer.

So you basically have to "interpolate" using the fps of the stream, and how many frames since the most recent NAV packet (or, similarly, calculate the difference of the MPEG timestamp from the MPEG timestamp at the time the last NAV packet was received, though I guess that might be one frame off? Anybody know if the NAV packet applies to the "next" video frame after it, or to the one previous?)

In my case it would be useful since I'm trying to come up with "accurate" EDL's for content edited playback of dvd's (via mplayer or the like).

Ghitulescu
9th November 2011, 17:03
see PTS and DTS for an explanation

rogerdpack
21st November 2011, 21:07
To answer my own question, I don't think you can easily--NAV packets are setup for seeking, and that's the default granularity. Though if you are clever about it you can infer from "time since last NAV packet" or can seek "to a NAV packet, then seek a few frames after that" though I know mplayer doesn't do that, you're stuck with NAV packet granularity.