HydrogenAudio

Lossless Audio Compression => FLAC => Topic started by: FOO_ME on 2006-06-24 11:01:44

Title: FLAC Checksum off
Post by: FOO_ME on 2006-06-24 11:01:44
I'm sorry if this has previously been asked, but I was unable to find anything pertaining to it.

I encoded a WAV into FLAC and calculated the MD5 for each and converted it back.  Both WAV files had the same checksum, but when I did --show-md5sum it gave me a compltely different value, that value didnt match the FLAC or the WAV.

If the result of the --show-md5sum is supposed to be different what is that hash calculated from?

Thanks,
Pete
Title: FLAC Checksum off
Post by: adamjk on 2006-06-24 11:16:49
Would you like to give some more informations regarding your software?
Title: FLAC Checksum off
Post by: FOO_ME on 2006-06-24 11:48:28
Would you like to give some more informations regarding your software?


I encoded it originally with the Convert To in foobar and decoded it the same way.  I did it again with Flac front end and got the same results.  The checksum was created with Hash Tab and wxChecksums and both of those came out the same.
Title: FLAC Checksum off
Post by: kjoonlee on 2006-06-24 12:41:57
I think it's derived from the raw PCM data, not the full .wav file. Anyway, if the FLAC file's md5sum (visible by using metaflac) stays the same, then there's nothing to worry about.
Title: FLAC Checksum off
Post by: disintegrated on 2006-06-24 12:45:07
http://flac.sourceforge.net/documentation.html (http://flac.sourceforge.net/documentation.html) says:
"Also included in the STREAMINFO block is the MD5 signature of the unencoded audio data."

So
--show-md5sum (.flac) != md5 (.wav)
but:
--show-md5sum (.flac) == md5 (.raw)

.raw is audio data only.. no headers, no riff chunks..
(.raw = .wav - nonAudioData)

on my machine, flac.exe decodes to .raw via
flac -d --force-raw-format --sign=signed --endian=little <flac-file>
Title: FLAC Checksum off
Post by: Triza on 2006-06-24 14:30:00
MD5 checksum calculation is unambiguous, but the layout of the data is NOT. So it matters how the data is layed out. I am referring to the various endianess schemes for example.

Triza
Title: FLAC Checksum off
Post by: FOO_ME on 2006-06-24 14:58:08
Thanks for clarifying it, it wasnt making any sense