[MPlayer-users] DVD PLayback with -ss option

D Richard Felker III dalias at aerifal.cx
Mon Jun 9 01:33:20 CEST 2003


On Sun, Jun 08, 2003 at 09:56:07PM +0800, Neilen wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Hi
> 
> On Sun, 2003-06-08 at 07:00, D Richard Felker III wrote:
> > [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> > On Sat, Jun 07, 2003 at 12:20:18PM -0400, A. Campling wrote:
> > > [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> > > Hi,
> > > I've been trying to use -ss option to playback a DVD using the -ss flag to 
> > > start the playback at some point other than the start of title 1, chapter 
> > > 1. For instance:
> > > mplayer dvd://1 -dvd-device /dev/cdroms/cdrom0 -ss 40:00
> > > When I do this, it takes me to the time on the disc marked 58:57.
> > > 
> > > For various other time settings, I get the same problem - never to where I 
> > > request, always some point forward from that.  I looked at all the numbers 
> > > at it appears to be a linear relationship of 1.5x what I request - but 
> > > never exactly that, more like 1.5 give or take a minute or so here and 
> > > there.
> > > I've verified that the times mplayer reports are correct on a component 
> > > player, so it's not the the OSD is wrong.
> > > 
> > > Is this a known issue?  anyone know how to correct this?
> > 
> > Yes, it's a known issue. The only way to reliably seek to 40:00 in
> > mpeg is to read and parse headers for the ENTIRE file up to that
> > point, which needless to say will take a bit of time... :( You can't
> > even optimize it with a binary search since timestamps in mpeg streams
> > can and often do lie/reset-to-0 at random... :(
> 
> Certainly one could kludge this up to at least work acceptably by:
> 
> First dividing the requested amount by 1.5, then checking the actual
> timestamp, and then searching to within a certain tollerance using
> feedback.

Nope, read what I said about binary search not being possible. Same
problems apply. If you want to ignore those problems, the binary
search method is still preferable.

> I mean, this is what I do manually when I want to seek to a certain
> position in a DVD, so I'm sure it can be automated ;)

If you check a few DVDs, you'll find that timestamp often resets to 0
at some or all chapter boundaries, or after the opening logos, etc. In
fact, it can reset at ANY point. So timestamp is not at all
reliable/useful for seeking (or for anything except maintaining a/v
sync) in mpeg.

Rich



More information about the MPlayer-users mailing list