[FFmpeg-cvslog] r20822 - in trunk: ffmpeg.c ffplay.c

Michael Niedermayer michaelni
Sun Dec 13 16:33:43 CET 2009


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


> 
> 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.


> 
> 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


> At least one input file must be specified
> 
> >      /* file converter / grab */
> >      if (nb_output_files <= 0) {
> >          fprintf(stderr, "At least one output file must be specified\n");
> > 
> > Modified: trunk/ffplay.c
> > ==============================================================================
> > --- trunk/ffplay.c	Sun Dec 13 11:07:08 2009	(r20821)
> > +++ trunk/ffplay.c	Sun Dec 13 14:49:14 2009	(r20822)
> > @@ -2539,6 +2539,7 @@ int main(int argc, char **argv)
> >      parse_options(argc, argv, options, opt_input_file);
> >  
> >      if (!input_filename) {
> > +        show_help();
> >          fprintf(stderr, "An input file must be specified\n");
> >          exit(1);
> >      }
> 
> I suggest to revert this and eventually add some warning of the kind:
> "At least one input file must be specified. Use -h for showing the
> inline help message."

As said, any half sane person knows that a media player or converter
needs to know which file is used what people migt not know is how to
specify it and what other options are available

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Thouse who are best at talking, realize last or never when they are wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20091213/6db6d3b6/attachment.pgp>



More information about the ffmpeg-cvslog mailing list