[FFmpeg-cvslog] r20822 - in trunk: ffmpeg.c ffplay.c
Stefano Sabatini
stefano.sabatini-lala
Sun Dec 13 17:36:54 CET 2009
On date Sunday 2009-12-13 16:33:43 +0100, Michael Niedermayer wrote:
> On Sun, Dec 13, 2009 at 04:15:16PM +0100, Stefano Sabatini wrote:
> > On date Sunday 2009-12-13 14:49:14 +0100, michael wrote:
> > > Author: michael
> > > Date: Sun Dec 13 14:49:14 2009
> > > New Revision: 20822
> > >
> > > Log:
> > > Show help if no cmd line options are provided at all.
> > > This safes the users time to find out which of -h --help -? works.
> >
> > I consider this a bad UI policy, a program should show help only when
> > it is explicitely requested to do so, that's generating a lot of
> > output when the only message displayed should be: "ehy you need to
> > specify a file".
>
> i dont agree, maybe it could be abbreviated but just what you suggest
> is not usefull. Any user alraedy knows he has to specify a file
Thinking twice at it this is not true, consider -version.
So a better behavior would be:
$ ffmpeg
No arguments specified. Use the -h option for showing the inline help message.
This is both more correct and less obstrusive.
Well I know that many CLI programs implement this behavior (no
arguments -> show help), but I always found that weird and subtlely
wrong, as this is doing the program to act in a way which wasn't
explicitely requested, I'd prefer to simply *suggest* to the user what
she may want to do rather than making the program act like that.
> > And BTW, yes the user is supposed to read the man page at some point,
> > at least to see how to ask for help.
>
> i know its popular in FOSS to make software hard to use.
> Still its my oppinion that software should be designed to be useable
> based on common sense and not designed to require reading a manual.
So you're suggesting that the user should know by common sense what
the ffmpeg options mean?
If we want to make ffmpeg more common-sense-proof we could simply add
one or more aliases for -h, this only requires a corresponding number
of lines of code.
> > Also no-one is preventing us to create an alias for "-h".
> >
> > > Modified:
> > > trunk/ffmpeg.c
> > > trunk/ffplay.c
> > >
> > > Modified: trunk/ffmpeg.c
> > > ==============================================================================
> > > --- trunk/ffmpeg.c Sun Dec 13 11:07:08 2009 (r20821)
> > > +++ trunk/ffmpeg.c Sun Dec 13 14:49:14 2009 (r20822)
> > > @@ -3985,6 +3985,9 @@ int main(int argc, char **argv)
> > > /* parse options */
> > > parse_options(argc, argv, options, opt_output_file);
> > >
> > > + if(nb_output_files <= 0 && nb_input_files == 0)
> > > + show_help();
> >
> > This is especially disturbing in the case:
> > ffmpeg in.avi ... out.avi #yes I perfectly know the syntax but I forgot to add an -i
> > [lot of unsolicited help]
>
> stop the rant, the code does not print the help in this case
Doh.
[...]
Regards.
More information about the ffmpeg-cvslog
mailing list