Help - Search - Members - Calendar
Full Version: How to validate a flac file
Hydrogenaudio Forums > Lossless Audio Compression > FLAC
freboat
when i get a flac file,

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

thanks
Mangix
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
QUOTE(jcoalson @ Oct 21 2006, 12:16) *

QUOTE(ozmosis82 @ Oct 21 2006, 04:00) *
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
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.


freboat
Thanks to all,
i tried "flac -t"
it seems to work well!
EuMesmo

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.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.