#357 encoded noise.flac longer than noise.raw


I'm using test_streams.sh to sanity check a decder implementation. The encoder (1.2.1) seems to build a largely 0 padded flac file that is much bigger than the original noise.raw file (1572864 bytes). The command line is:

flac --verify --force --force-raw-format --endian=little --sign=signed --sample-rate=44100 --bps=24 --channels=2 -0 -e --lax -b 65535 --disable-verbatim-su
bframes --disable-constant-subframes --padding --output-name=../../decoder/vecs/noise.flac ../../decoder/vecs/noise.raw

noise.raw: Verify OK, wrote 6093164 bytes, ratio=3.874

Sorry if this has been addressed before, wasn't able to find anything the bug reports on this.
Can send the noise.raw file if required.

D Fee


  • Erik

    Erik - 2014-03-21
    • status: open --> closed-invalid
    • assigned_to: Erik
    • Group: --> 1.3.0
  • Erik

    Erik - 2014-03-21

    This is not a bug.

    For audio data for which FLAC cannot find a compressed representation which is smaller than the origninal it will store that block in the output file in a 'verbatim' block. If the output file contains nothing but verbatim blocks (very common when compressing for instance white noise), the output file can end up being bigger than the input file, because each block in the output also has a header which was not present in the input.

    The current version of the flac executable will print a warning message if the output file is larger than the input.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks