[flac] Differing RIFF Lengths

Josh Coalson j_coalson at yahoo.com
Mon Aug 25 10:37:14 PDT 2003



> Why is it that sometimes when I encode a .wav file then decode it
again 
> the length of the generated file is 2 bytes shorter than the length
of 
> the source file? 
> 
> The discrepancy in length occurs in the header and the remainder of
the 
> data from there on is identical. It seems to me that what appear to
be 
> length fields in the header is adjusted appropriately. 
> 
> I suspect that this is not a problem, but it makes using 'cmp' to
prove 
> that FLAC works for me difficult. 

the difference is probably a 18-byte fmt subchunk in the original
vs. a 16-byte in the decoded WAV.

flac isn't a WAV file compressor, it does not store everything
about a WAV file so it can be exactly reproduced, it only stores
the audio, so cmp is not the right way to prove that flac is
working.  a better way is to compare the MD5 sum in the .flac
header with the equivalent one from the WAV file, which you can
generate with shntool.

Josh

<p>__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'flac-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is
needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Flac mailing list