Erik de Castro Lopo wrote:> Does that explain it?Sure. But maybe it makes sense to write "WARNING" instead of an "ERROR"? Or to compare compress ratio with 1.01 (or 1.05 or 1.1) instead of 1.0?
lvqcl wrote:> Sure. But maybe it makes sense to write "WARNING" instead of an "ERROR"?Well its an ERROR because the flac executable will exit with a non-zero exit code, so this condition can be caught in for example a shell script. If its only a warning, why would the executable return non-zero?> Or to compare compress ratio with 1.01 (or 1.05 or 1.1) instead of 1.0?As soon as the output file is the same size of bigger than the input, the encoding process is no longer providing compression. I think checking against 1.0 is in fact the correct behaviour. There is a --no-error-on-compression-fail command line option. Its documented in the HTML docs I've just added it to the --help output. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
On Jan 31, 2014, at 23:06, Erik de Castro Lopo wrote:> lvqcl wrote: > >> Sure. But maybe it makes sense to write "WARNING" instead of an >> "ERROR"? > > Well its an ERROR because the flac executable will exit with a non- > zero > exit code, so this condition can be caught in for example a shell > script. > > If its only a warning, why would the executable return non-zero?I think a more appropriate term would be FAILURE, as in COMPRESSION FAILURE, because the compression failed to make the file smaller. Error implies that the program is not working the way that it is supposed to, especially when it suggests contacting the developers to correct the problem. There is nothing to be done with a lossless algorithm that cannot guarantee it will always compress any data that might be given to it. It is not an error when that algorithm fails to losslessly compress a particular set of data. It's simply a mathematical fact.>> Or to compare compress ratio with 1.01 (or 1.05 or 1.1) instead of >> 1.0? > > As soon as the output file is the same size of bigger than the input, > the encoding process is no longer providing compression. I think > checking > against 1.0 is in fact the correct behaviour. > > There is a --no-error-on-compression-fail command line option. Its > documented > in the HTML docs I've just added it to the --help output.Ah, there you see that "fail" is the terminology used in the option. I suggest replacing ERROR with FAILURE, and removing the comments about contacting the developers. Brian Willoughby
Erik de Castro Lopo wrote:>> Sure. But maybe it makes sense to write "WARNING" instead of an "ERROR"? > > Well its an ERROR because the flac executable will exit with a non-zero > exit code, so this condition can be caught in for example a shell script. > > If its only a warning, why would the executable return non-zero?But why should it return non-zero exit code? The input files are valid, all calculations are valid, but FLAC returns an error... IMHO it's counter-intuitive: I can't find another lossless encoder or general-purpose file archiver that works in the same way.