If I use flac with piped input it warns: FAILURE: Compression failed (ratio 495232,432, should be < 1.0). This happens for some files for one or more of the following reasons: * Recompressing an existing FLAC from a higher to a lower compression setting. * Insufficient input data (eg, very short files, < 10000 frames). * The audio data is not compressable (eg a full range white noise signal). Reproducible with the following command line: flac --ignore-chunk-sizes - -o out.flac < test.wav
Erik de Castro Lopo
2014-Jul-01 10:25 UTC
[flac-dev] Message about compression ratio with stdin input
lvqcl wrote:> Reproducible with the following command line: > > flac --ignore-chunk-sizes - -o out.flac < test.wav> src/flac/flac --ignore-chunk-sizes - -o a.flac < flac-test-stereo.wavI get this: flac 1.3.0, Copyright (C) 2000-2009, 2011-2013 Josh Coalson & Xiph.Org Foundation flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. Type `flac' for details. INFO: Make sure you know what you're doing when using --ignore-chunk-sizes. Improper use can cause flac to encode non-audio data as audio. -: WARNING: skipping unknown chunk 'LIST' (use --keep-foreign-metadata to keep) -: WARNING: 'data' chunk has non-zero size, using --ignore-chunk-sizes is probably a bad idea (No runtime statistics possible; please wait for encoding to finish...) (No runtime statistics possible; please wait for encoding to finish...) -: INFO: hit EOF with --ignore-chunk-sizes, got 148471808 samples FAILURE: Compression failed (ratio 7742270.591, should be < 1.0). This happens for some files for one or more of the following reasons: * Recompressing an existing FLAC from a higher to a lower compression setting. * Insufficient input data (eg, very short files, < 10000 frames). * The audio data is not compressable (eg a full range white noise signal). Removing the last four lines is easy but is it sufficient? Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
Erik de Castro Lopo wrote:> INFO: Make sure you know what you're doing when using --ignore-chunk-sizes. > Improper use can cause flac to encode non-audio data as audio. > -: WARNING: skipping unknown chunk 'LIST' (use --keep-foreign-metadata to keep) > -: WARNING: 'data' chunk has non-zero size, using --ignore-chunk-sizes is probably a bad idea > (No runtime statistics possible; please wait for encoding to finish...) > (No runtime statistics possible; please wait for encoding to finish...) > -: INFO: hit EOF with --ignore-chunk-sizes, got 148471808 samples > FAILURE: Compression failed (ratio 7742270.591, should be < 1.0). > This happens for some files for one or more of the following reasons: > * Recompressing an existing FLAC from a higher to a lower compression setting. > * Insufficient input data (eg, very short files, < 10000 frames). > * The audio data is not compressable (eg a full range white noise signal). > > Removing the last four lines is easy but is it sufficient?I tried myself to fix this message. How about the attached patch? -------------- next part -------------- A non-text attachment was scrubbed... Name: encode.patch Type: application/octet-stream Size: 6733 bytes Desc: not available Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20140701/2961bd69/attachment.obj