Are there any programs that will analyze the structure of the specific music format WAV, FLAC and MP3 and make an educated guess on whether the file structure is corrupt.
I encountered corruption in a FLAC file that was used to create a MP3. Both FLAC and MP3 had the music breaking up in the same spots. I recreated the FLAC/MP3 from the original WAV file which was OK. I think this was disk corruption from back in 2022 and want to make sure the the other FLAC’s are fine before finally removing the original WAV files.
Someone can correct me if I am wrong, but FLAC store a checksum of the audio data in the metadata. And using the official FLAC tool with the -t option will test them. So you could make a script to use that to test all your FLAC files. Don’t know about the other formats.
They exist. I had some borked MP3 from a automated podcast download. They stood out initially due to missing TAGs. I used this GUI tool to sift them out. Simple and fast. https://mp3val.sourceforge.net I didn’t use the repair mode as I could just return to the source and download again.
FLAC has an embedded MD5 checksum. And a simple a commandline test option with the above tools @DontMindMe points at. For people like me who like GUIs there is Flactfrontend that bolts on top of it. Example of use: Test FLACs for corruption - bliss
After installing foobar2000 see Utilities → Verify integrity from the right-click context menu to check the file for errors. In case of an erroneous MP3 header, Fix VBR MP3 header might even repair the file
Note: In many cases the troublesome file may play correctly in some or all media players or may be editable in other metadata editors. However, this is not an indicator of whether the file structure is valid or not. In contrast to just playing a file, Mp3tag re-writes the metadata part of files and takes a cautionary approach when performing changes that might affect the audio part to prevent data loss or more damage.
I saw that last night using mediainfo, the checksum of the newly created file and the original are different so I may need to rethinking disc corruption. I am just in the beginning of checking this out. Two years ago I started generating md5sums of all my music and cover-art files, but that was after the creation of the files in question.
That will make sense you get two different checksums from the new file and original file as you’re using different level of compression, and maybe even an updated FLAC tool to compress.
It is more about if the MD5 of the original matches what a newly generated MD5 of that original now creates.
Beware with MD5, as it scans the whole file, including metadata (tags).
Any small tag change (rating, play count, replay gain, etc.) will change the MD5 checksum.
Just a followup on what I think happened and my plans. I am pretty convinced this was a issue with my system disk going bad and reading bad data when creating the flac image but reading it correctly when I archived the wav file to the archive disk. I am not sure yet if I have this issue on any other files. There is no way I know of (or found) to check for corruption in the wav file.
I looked and could not find a program to read the raw PCM data from the wav file and create a MD5sum to compare to the embedded MD5sum in the flac file. I am going to set up a batch script to use “flac” to encode the archived wav image into flac then extracting the MD5sum and compare it to the present flac image files, at least I will know that the archived flac files came from the archived wave files.
I will also run the wav/cue file images through cuetools verifier to verify that they match my EAC rips. A lot of work, but once done I will know what I may have to re-rip.
ffmpeg -loglevel warning -hide_banner -i file.flac -map 0:a -f hash -hash md5 - gives you the md5sum of the decoded audio stream of file.flac. Works for flac and wav and any other (lossless) file format ffmpeg knows.
Thank you, I was looking at ffmpeg today but my 64 bit cygwin install “appears” to have some kind of 32 bit “something” causing ffmpeg to fail on execution. I have some custom builds I did a few years back and am not sure how well I documented them. I really hate reinstalling cygwin since I always miss “something” I need. I thought about the windows ffmpeg executable but I do not enjoy scripting in “windz”.