[MPlayer-dev-eng] [PATCH] better seeking in dvd

elupus elupus at ecce.se
Mon May 8 00:21:32 CEST 2006


> 
> This patch permits to use the timing map present in the IFO files
> and next refine the search in the demuxer, consequently
> -ss (and seeking in general) works better.
> 

Should have read the patch.. It won't work no as you must find what vts you
are playing. Think that should be available somewhere. This is the only part
you should start counting time in. The you have the problem that many dvd's
have quite a lot of discontinuities in their pts times. Atleast as what is
given from the demuxer. I'm not sure how mplayer handles that. 

If you are able to get the current playback time without discontinuities (ie
this is not the pts as given from demuxer), you should be able to find the
correct sector from the tmap data. The problem is that pts - startingpts
isn't good enough. Dvd's have many many places in them where the pts loops
back. In the tmap data you can see those places by that extra flag set. Best
way is to follow cells that are to played and accumulate the cell times up
till the time you wish to get to (not counting cells that are not part of
the angle being played).

It's a pain to get this right even when playing dvd's properly using
libdvdnav. not to mention that it is wrong in current libdvdnav source since
it handles multple angles incorreclty, there is a patch for that on their sf
page thou.

I say, don't even bother untill the dvdnav patch is in place :).


/elupus





More information about the MPlayer-dev-eng mailing list