[MPlayer-dev-eng] [PATCH] allow -ss xx% syntax

Rich Felker dalias at aerifal.cx
Tue Sep 19 07:09:26 CEST 2006


On Tue, Sep 19, 2006 at 03:32:29AM +0400, Evgeniy Stepanov wrote:
> On Tuesday 19 September 2006 02:52, The Wanderer wrote:
> > Evgeniy Stepanov wrote:
> > > Hi,
> > >
> > > this patch allows using %% of movie length as -ss argument. This
> > > gives an easy way to seek to the middle of the file. Several people
> > > on -users asked for it.
> >
> > While this might be a desirable feature, should it really be piggybacked
> > on top of '-ss' (which is 'seek to second') rather than getting its own
> > option?
> 
> It could be called -sp (seek to percentage). But then people might wrongly 
> assume that all three options -ss, -sp, -sb do nearly the same. If fact, -sb 
> is very different from the other two.
> 
> Btw, the problem is already there, users tend to think that -sb means "seek to 
> the first keyframe after given position in file". I think man page should be 
> more verbose on this matter.

IMO what -sb means is "ignore the first N bytes of the file". The
behavior you describe is only true for formats where global headers
don't exist or are irrelevant.

> Anyway, I still like -ss xx% syntax better. Users don't need to memorize yet 
> another option, the usage is quite clear and unconfusing. -ss argument format 
> is already complex, so parsing %-s does not add much code.

Agree, it's not such a bad idea but I'm still not sure. Also it could
cause problems because the idea of total length is usually horribly
wrong.

> Renaming existing options is out of question, right ? Is there a policy for 
> this ?

Yes, it's generally not allowed unless there's a very good reason or
unless Diego slips it past us without anyone noticing... ;)

Rich




More information about the MPlayer-dev-eng mailing list