[Flac-dev] flac command line usage (was: the road to 1.0...)

Larry Fenske larry at towanda.com
Wed May 2 06:27:32 PDT 2001


I may be a bit behind, since I haven't looked at the latest documentation
in CVS.  My apologies if these problems have already been solved.

I think having a default file name is a good idea, but it should be just
a default.  There should also be a '-o' option to specify the output
file name.  This option would only apply if there is one input.  '-o'
should also accept a "file name" of '-' (as in '-o-') to specify stdout.
The default output when input is stdin should be stdout.

I think this option would solve the four problems listed below.

Larry Fenske

> > > I think the easiest way to make all of this "just work" would be to
> > provide
> > > a default output filename for both encoding and decoding, e.g.:
> > > 
> > > flac file.wav
> > > 
> > > would produce file.flac, and
> > > 
> > > flac -d file.flac
> > > 
> > > would produce file.wav.  That way, flac *.wav and flac -d *.flac
> > are
> > possible,
> > > and their behavior easily understood.
> > > 
> > 
> > OK, I kind of like Matt's usage idea best.  I think there are only
> > two minor downsides:
> > 
> > 1. You won't be able to do basename renaming within the command
> > anymore, i.e. 'flac 01.wav songname.flac', you have to do a
> > 'flac 01.wav && mv 01.flac songname.flac'
> > 
> > 2. This one's way out there, but I guess if someone were on DOS then
> > .flac will be too long and there's no way to get around that unless
> > I add some option to specify a default extension.
> > 
> > So unless there's a really big objection I think I'll go and make
> > the changes so that the output file name is automatically determined
> > and you can specify multiple input files.
> > 
> Now, that I've gone to implement it, there's a problem it creates
> with piping, that flac doesn't know what to name an output file
> when the input is stdin, and there would be no clean way to tell
> to write a decoded file to stdout.  Any suggestions?
> 
> Josh




More information about the Flac-dev mailing list