[FFmpeg-devel] [PATCH] Make ff* recognize?------long-gnu-options

Stefano Sabatini stefano.sabatini-lala
Tue Dec 15 01:24:31 CET 2009

On date Tuesday 2009-12-15 10:36:47 +1030, Rodney Baker encoded:
> On Tue, 15 Dec 2009 10:21:31 Stefano Sabatini wrote:
> > On date Monday 2009-12-14 01:28:06 +0100, Michael Niedermayer encoded:
> > > On Sun, Dec 13, 2009 at 07:00:48PM +0100, Stefano Sabatini wrote:
> > > > Hi, I don't know if skipping an undeterminated number of '-' is a
> > > > misfeature but was easy to implement and I find it quite funny to run
> > > > ffmpeg ------------------help, we can reduce the number of skipped '-'
> > > > to 2 if requested.
> > > >
> > > > Patches attached.
> > >
> > > I agree that this is funny but i think it does little good ...
> > > it could confuse people and scripts could become dependant on it and then
> > > we cant even remove it wihout pissing people off.
> > 
> > So what about to accept at least both -foo and --foo options?
> > [..]
> Pardon me for butting in (I'm usually only an interested observer on this 
> list) but wouldn't it be better to stick to the normally accepted convention 
> of -f (short option) or --foo (long option) (remembering of course that not 
> every short option necessarily has a matching long option and vice versa)?

I'm not sure this (long/short options distinction) has been a good
idea since the beginning. --long-options require two '--' to make
non-ambiguous expressions of the kind --foo and -foo (-f -o -o) and is
intended for apps which have the need/capability to concatenate more
short options.

ff* tools typically have *plenty* options so the usefulness of short
options and the possibility to concatenate them (if boolean) is rather
small. But note that with the previous patch you can still use both
ffmpeg -f FORMAT --debug
ffmpeg --f FORMAT -debug

and it should be even possible to add aliases for options if you need
them simply cloning an option entry, e.g. you could define
--format/-format as an alias for -f.
> Having it behave the same as other GNU/Linux apps makes things much easier to 
> remember, especially when scripting.
> Just my $0.02 from an ffmpeg user's perspective... 

FFmpeg = Faboulous and Fast Majestic Puristic Entertaining Genius

More information about the ffmpeg-devel mailing list