View Single Post
  #369  
Old 2007-01-05, 04:14 AM
roann's Avatar
roann roann is offline
TTD Staff
 
Join Date: Nov 2004
Location: Planet Earth
Arrow Re: Trader's Little Helper

@sammywho:

1) A bit oversimplified an audio file consists of two parts: a non-audio data part (the so called file header) and an audio data part (wav data, or flac data, for example). Among others the file type and the properties of the audio data (number of channels, sampling rate, etc.) is stored in the file header.

2) When you encode a wav file to flac format the flac encoder by default computes the md5 checksum of the raw wav data and stores the checksum in the header of the flac file (this is the so called flac fingerprint).

3) When a program creates a flac fingerprint file (.ffp) it just reads that fingerprint from the header of the flac file. That's all. No checking is done whether the flac file has become corrupt or not.

4) When you verify a flac fingerprint using TLH two steps will be performed: First the checksum in the ffp file will be checked against the checksum in the flac file header. Then the flac audio data will be decoded back to wav format, and a md5 checksum of the raw wav data will be created. Only if all three checksums (that in the ffp file, that in the flac file header, and that newly computed checksum of the decoded raw wav data) do match you can be sure that the flac file is not corrupt. (Note that a) in earlier versions of TLH that second step will be performed only if you check the "Full vrfy." option, and b) in the last releases of TLH you can uncheck that option in the Preferences dialog (this is not recommended).)

5) If you get the error message file '...' failed verification (checksum in metadata block does match, but md5 checksum does not match) the checksum in the ffp file and the checksum in the flac file header are identical. But they do not match the newly computed checksum of the decoded raw wav data. In other words: either the audio part of the flac file has become corrupt (at least one bit of audio data was altered), or the fingerprint data in the flac file header has become corrupt before the ffp file was created.

Robert
Reply With Quote Reply with Nested Quotes