[Flac-dev] Bug with FLAC raw encoding

Josh Coalson xflac at yahoo.com
Mon Feb 5 09:01:26 PST 2001


> You mentioned that one update was to include an md5
> signature of the
> compressed stream to detect errors? Could you also
> not store the md5
> signature of the original wav data? This would mean
> it'd be impossible for
> flac to extract an invalid .wav file. I know this
> would not help someone
> that had deleted their original wav, but it would at
> least mean problems
> are reported immediately without people then further
> processing dodgy wav
> files? Any possible rot would be stopped early.
>
actually the MD5 *is* on the unencoded data.  I'll
check back with the docs to see if they're wrong.

there are many ways that data can be fed to the MD5
accumulator while encoding since the data can come
in at many resolutions, big-endian/little-endian,
etc., so the format I chose was channel-interleaved,
little-endian, byte-aligned, so that the MD5 signature
you get in the flac file should be the same as the
one you get if you strip off the header of the wav
file and run md5sum on it..

>   Also, a few more minor points. I don't know what
> others feel, but I
> think the way shorten works is intuitive. i.e. the
> following compresses a
> file:
> 
> $ shorten file.wav
> 
> this creates file.wav.shn and deletes file.wav. This
> is the way all UNIX
> compressors; compress, gzip, bzip & lame have
> worked. They simply add on
> their own extension without making the mistake of
> trying to understand and
> then munge the existing filename.
>   You have the option of specifying this if you
> want:
> 
> $ shorten file.wav file.shn
> 
> and in that case the original won't be deleted. But
> if you don't specify
> the destination file then I think the .wav.shn
> extension is fine as it
> allows:
> 
> $ shorten -x file.wav.shn
> 
> to simply give you back the original file.wav and
> deletes file.wav.shn. I
> know flac is still beta, so the deleting might be
> left off by default
> until v1.0.
>   Wav file format is the default, whereas you have
> to specifiy -fw to
> flac.
>   It also preserves the modification time of the
> original file as do all
> other UNIX compressors. Unless I'm not paying
> attention, flac doesn't seem
> to do this?
>
yeah, this is all true.  it is easy enough to add
this and I probably will now.  flac is slightly
different that the examples you mentioned in this
way: it is not really a wav file compressor, it's
a converter.  right now some kinds of wav metadata
is not stored, so I thought I was avoiding confusion
about usage.

Josh


__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/




More information about the Flac-dev mailing list