Skip to main content

Topic: How to validate a flac file (Read 14786 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • freboat
  • [*]
How to validate a flac file
when i get a flac file,

how can i simply check whether it is  corrupt  compared with the original  wav file ?

thanks

  • Mangix
  • [*][*][*][*][*]
How to validate a flac file
Reply #1
decode it. i believe that josh coalson confirmed that FLAC checks the md5 which is stored inside.

also, if it is corrupt, the FLAC decoder will error while playing(this shows up at the Console in foobar2000).

  • ozmosis82
  • [*][*][*]
How to validate a flac file
Reply #2
Anyway, I went to WavPack because of the MD5 checksum that it stores and uses to check against when decoding. I realise that FLAC stores the MD5 checksum in the compressed file's metadata, but I wasn't sure if it actually checks against it when decoding.

FLAC was the first codec to have the MD5 sum (it was there from the beginning) and it checks it when decoding.

http://flac.sourceforge.net/documentation.html
"In test mode, flac acts just like in decode mode, except no output file is written. Both decode and test modes detect errors in the stream, but they also detect when the MD5 signature of the decoded audio does not match the stored MD5 signature, even when the bitstream is valid. "

http://flac.sourceforge.net/documentation...._options_decode
-d, --decode    Decode (flac encodes by default). flac will exit with an exit code of 1 (and print a message, even in silent mode) if there were any errors during decoding, including when the MD5 checksum does not match the decoded output. Otherwise the exit code will be 0.

Josh

Voila

  • Synthetic Soul
  • [*][*][*][*][*]
  • Global Moderator
How to validate a flac file
Reply #3
If you have a load of files to test I suspect foobar's File Integrity Verifier may be handy.

If not, I have a batch file that can help.
I'm on a horse.

  • freboat
  • [*]
How to validate a flac file
Reply #4
Thanks to all,
i tried "flac -t"
it seems to work well!

  • EuMesmo
  • [*]
How to validate a flac file
Reply #5
The FLAC frontend for windows has a TEST function.
And if you have too many files, try FLACTester, from this page: http://www.vuplayer.com/other.php

It's a simple, no install, program that does the same as flac -t.

I have tryed the foobar file integrity check and it failed me once with a flac file.