HowTo - verify

MuseWiki, wiki for the band Muse
Jump to navigation Jump to search

To verify that your copy of a recording has retained its integrity, you can generate a hash of the audio data and compare against a hash previously generated for this purpose.

Assuming that the files are in FLAC format, use the included metaflac utility like so:

metaflac --show-md5sum audio_file.flac

Alternatively, a more complicated way is to extract the raw pcm data and compare the hashes, like so:

flac -d in_file.flac -o out_file.wav

sox out_file.wav raw_file.raw

Next, use *sum to generate a hash of the resulting raw file, for example for 512-bit SHA-2:

sha512sum raw_file.raw

You should get a hash digest, similar to the following example:

b7cd89152667d98083871b66bb25c881555b4b9c9e0a24cdc5decfc5a86bff310d0ced75287630eb4951b6e250fa22d577a5e43a112b9f7aabce49319263252c  raw_file.raw

Then compare this digest to a provided one. If it is identical, the file has retained integrity and is not corrupt.

This will remain the case so long as the file remains lossless. If it is compressed with a different lossless codec or different settings, the decompressed pcm data should always remain identical.

Go back to help