[DVDnav-discuss] OSD wrong decimal points with DVD/DVDNAV
rogerdpack2 at gmail.com
Tue Oct 25 16:27:38 CEST 2011
I noticed the other day that the fraction timestamp gets "out of sync"
in the OSD, when playing DVD/DVDNAV in mplayer, a la
$ mplayer dvdnav:// -osdlevel 1 -osd-fractions 1
ex output (OSD outputs are the following):
00:00:04.01 # lose a second
00:00:05.24 # regain it
It appears from a casual perusal that this is because the "second" pts
count is being taken from demuxer_get_current_time (which returns the
DVD's latest nav packet second, only updated maybe every 0.4s), but
the numbers after the decimal point are being inferred from
mpctx->sh_video->pts, the raw mpeg packet, which is slightly
different. So it gets out of sync.
So I'm assuming that a "good fix" for this would be to try to make
dvdnav_get_current_time return a more precise timestamp, then passing
that through and using only that for both the decimal and second
So...question: anybody know how to get "exact" DVD timing information
within dvdnav? Any hints/clues?
Any other words of advice before I dive in? Does my approach seem reasonable?
I could also kind of hacky work-around it by remembering when the
previous NAV packet was and calculating the time between then and now
 but I'd guess that's not ideal...
Also while looking at this, I noticed that
1) sometimes the mpeg video stream in DVD's starts about 0.28s
"before" the NAV packets say the movie starts.
2) the NAV packets seems to not be off from this a bit. For example
at second 0.70 they will say "it's second 0.5 now" anybody know why
that might be? My guess is that they don't take that first 0.28 into
consideration somehow...(which, coincidentally, when you rip it, it
typically says that start second 0 is the same as DVD
More information about the DVDnav-discuss