Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: WAV files are going defect (Read 21294 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

WAV files are going defect

I have some problems with WAV files and maybe you can help me or you have an idea.

Last year I ripped my whole CD collection to WAV. In summer-holiday I often listened all PLACEBO records over and over in my car, I used original WAV and I never found or hear a problem. In autumn I changed to other music and just 2 weeks ago I went back to the same PLACEBO set.

Unfortunately, one of the songs now makes a crazy sound after some minutes of running, and then I only hear a loud acoustic noise. First I thought theres a problem with my car hifi or with the USB-stick, but the original ripped song on the hard disk in my PC made the same sound.Cause I cannot find a solution, I ripped again and now it seems fine.

However, now the horror occurs: Today I found the same problem in two other songs from two different albums, and now there´s a PANIC! What happened to my WAV files?

All songs have the same problems with a loud acoustic noise after listening a while and it appears for approx 10-20 seconds and then disappear again.

You can listen this example (around 4 minutes, should reduce volume!).

MODERATION: LINK REMOVED PER TOS #9

Do you have any idea what happend and do you have any idea, how I can find all defect songs to repair them?


PS.: I used RELAY GAIN function from foobar2000. Could this have triggered the defect??

WAV files are going defect

Reply #1
That link doesn't work, so I can't look at the file, but probably either the device the files are stored on is failing or something you edited the files with screwed them up.

WAV files are going defect

Reply #2
If a WAV file gets corrupted in a way that the bytes are off one byte (if somehow one byte got deleted/removed) the high & low bytes can get interchanged and you'll get "pure noise".  It can happen to part of the song.    If it gets off by 2-bytes, the left & right channels can get switched, but you might not notice that.  (That's assuming a 16-bit file.)  I had that problem once when and it was a bad hard drive.    In my case I also had some inter-mixed so I'd be listening to one song and suddenly it would switch to another song. 
Quote
First I thought theres a problem with my car hifi or with the USB-stick, but the original ripped song on the hard disk in my PC made the same sound.
I assume the corrupted files were copied from your hard drive to the USB stick.

Make sure you back-up, and I'd recommend backing-up everything on your hard drive because there could be other corrupted files.    If it continues to happen you may need to replace your hard drive.

WAV files are going defect

Reply #3
If a WAV file gets corrupted in a way that the bytes are off one byte (if somehow one byte got deleted/removed) the high & low bytes can get interchanged and you'll get "pure noise".  It can happen to part of the song.    If it gets off by 2-bytes, the left & right channels can get switched, but you might not notice that.  (That's assuming a 16-bit file.)  I had that problem once when and it was a bad hard drive.    In my case I also had some inter-mixed so I'd be listening to one song and suddenly it would switch to another song. 
Quote
First I thought theres a problem with my car hifi or with the USB-stick, but the original ripped song on the hard disk in my PC made the same sound.
I assume the corrupted files were copied from your hard drive to the USB stick.

Make sure you back-up, and I'd recommend backing-up everything on your hard drive because there could be other corrupted files.    If it continues to happen you may need to replace your hard drive.



Can you tell me if there is a bit pattern to scan and search for inside the files to locate defect WAV. I have over 5500 WAV´s and I´d like to locate and repair them.

WAV files are going defect

Reply #4
If a WAV file gets corrupted in a way that the bytes are off one byte (if somehow one byte got deleted/removed) the high & low bytes can get interchanged and you'll get "pure noise".  It can happen to part of the song.    If it gets off by 2-bytes, the left & right channels can get switched, but you might not notice that.  (That's assuming a 16-bit file.)  I had that problem once when and it was a bad hard drive.    In my case I also had some inter-mixed so I'd be listening to one song and suddenly it would switch to another song. 
Quote
First I thought theres a problem with my car hifi or with the USB-stick, but the original ripped song on the hard disk in my PC made the same sound.
I assume the corrupted files were copied from your hard drive to the USB stick.

Make sure you back-up, and I'd recommend backing-up everything on your hard drive because there could be other corrupted files.    If it continues to happen you may need to replace your hard drive.



Can you tell me if there is a bit pattern to scan and search for inside the files to locate defect WAV. I have over 5500 WAV´s and I´d like to locate and repair them.


Once they are broken, repair is highly improbable. Repair is by means of obtaining valid replacements.

There are reasons why my music collection is stored on several different computers and several different forms of storage media including a 4 drive SSD-based RAID 5 array.

WAV files are going defect

Reply #5
If those files were ripped accurately and as full albums, you could try using CUETools in repair mode. It only works for small corruption though.

WAV files are going defect

Reply #6
"approx 10-20 seconds" is probably too much to repair, but at least you can use "verify" function in CUETools to find bad tracks.

P.S. and it seems that something is wrong with you hardware (e.g. HDD or RAM).

WAV files are going defect

Reply #7
Quote
Can you tell me if there is a bit pattern to scan and search for inside the files to locate defect WAV.
No.  The WAV is just a series of bytes following the header.    If a byte is wrong there's no way for the computer to know.

If it's a high-byte/low-byte problem, it's theoretically  possible to make a repair with a hex editor (which allows you to edit bytes in a file) but you might be missing a byte so you'd have to guess/interpolate and the repair wouldn't be perfect.    As a practical  matter, with 44,100 16-bit samples per second and 2 channels of data that's 192,000 bytes per second and you'll never find the exact byte where the problems starts and stops.    And, the data may be scrambled in some other way.
 




WAV files are going defect

Reply #8
Quote
Can you tell me if there is a bit pattern to scan and search for inside the files to locate defect WAV.
No.  The WAV is just a series of bytes following the header.    If a byte is wrong there's no way for the computer to know.

If it's a high-byte/low-byte problem, it's theoretically  possible to make a repair with a hex editor (which allows you to edit bytes in a file) but you might be missing a byte so you'd have to guess/interpolate and the repair wouldn't be perfect.    As a practical  matter, with 44,100 16-bit samples per second and 2 channels of data that's 192,000 bytes per second and you'll never find the exact byte where the problems starts and stops.    And, the data may be scrambled in some other way.


Hi guys.

No need here to repair the damaged files, I still have all that CDs. I only need to identify all the defect WAV-files by batch and I want to get a report. I checked WaveRepair and Wave Corrector, but I cannot see any function to provide that in batch mode.

As far as the symtoms are the same, I believe its easy to identify andy defect file.

If someone request a link, I can send the two screenshots where you can see the hole in the spectrum and also one damaged WAV fpr example.

Regards

WAV files are going defect

Reply #9
You misunderstand the problem.
You have, with 90% probability, failing hard drive. You have to first check if that is the case - then check RAM.
When you sort these things right (buy new drive, backup files onto new drive, replace RAM if needed) you can begin to check the files.
TAPE LOADING ERROR

WAV files are going defect

Reply #10
You misunderstand the problem.
You have, with 90% probability, failing hard drive. You have to first check if that is the case - then check RAM.
When you sort these things right (buy new drive, backup files onto new drive, replace RAM if needed) you can begin to check the files.


@hlloyge

Thanks - I know what is the problem, but this does not help me to locate the damaged files. I am able to change HDD and I am also able to copy all files to another HDD, but indeed this will not help me to locate damaged files.

However, I already made 2 copies of all files w/o having any problem while copying.

If I will know which files are damaged, I can rip again from CD. So I need another information.

Ok?


WAV files are going defect

Reply #12
File integrity verifier won't do much for PCM (wav) audio.

It might help, in order to locate the problems, to do a loudness scan. The produced noise is generally of higher intensity than music (I am not sure if replaygain would help here, I was thinking more in line of a max RMS  scan. Amplitude peak won't help, since I am assuming your files are 16bit integer).

WAV files are going defect

Reply #13
A few things. Before anything else, we assume your drive is dying. DO NOT do anything else with that drive beyond copying your data off it. It could die completely at any moment.

1st, rip any new additions to FLAC. Once you verify your existing library transcode the valid versions to FLAC. If you stored your music in FLAC format then finding corrupted files would be trivial since FLAC stores a checksum of the uncompressed audio which can be used to verify the file integrity.

2nd, BACKUPS! If you have a good, validated backup then finding corrupted files is again trivial by simply comparing against the known good backup. In addition, figuring out which files are corrupted becomes a waste of time. Restore everything from backup to a good drive and don't look back.

3rd, Use a filesystem which can detect and correct bit rot and other silent corruption on the fly. ZFS, btrfs, etc.

WAV files are going defect

Reply #14
It's much easier to detect corrupted FLAC/WavPack/APE/etc files...

WAV files are going defect

Reply #15
If you can read files off of your hard drive without errors then it is not likely your drive that is failing.  Despite what many think, it is very very rare for a hard drive to return corrupt data.  Modern hard drives have massive amounts of ECC, they will detect errors and either correct if possible or throw an error to the OS.  If there are no errors or massive slowdowns when simply copying your files then your hard drive is not the likely culprit.  If your hard drive returns "corrupt" data then either your RAM is bad, or the file was not written correctly in the first place.

Corrupt files are far more likely to be caused by bad RAM.  The RAM in most PCs has no ECC at all.  Before you go any further, download memtest86 and let it run for at least a few passes despite how long that takes.  If your RAM is bad you will just get corrupted files again even if you replace your drive.

It is also possible that your filesystem is bad and you have cross linked files.  This means that the OS has lost track of which blocks belong to which files.  This looks like a bad hard drive, but really isn't.  It can be caused by bad RAM or your PC being shutdown improperly during file writes.

WAV files are going defect

Reply #16
err, is nobody reading the OPs replies?

He knows what the problem is, has already made a backup and is looking for a tool to find the corrupted wav files.

Who are you and how did you get in here ?
I'm a locksmith, I'm a locksmith.

WAV files are going defect

Reply #17
Install PerfectTunes, it will mass check your audio against AccurateRip (the AccurateRip checker is in the free version of PerfectTUNES).

WAV files are going defect

Reply #18
Alternatively, you can use CueTools which may also be able to fix the corruption; and unlike the suggestion above, this enhanxed functionality is also completely free of charge.

WAV files are going defect

Reply #19
err, is nobody reading the OPs replies?

He knows what the problem is, has already made a backup and is looking for a tool to find the corrupted wav files.


YES men - that´s right, I know the problem of the disk and I know how to save and backup (and upps, I am at my IT job since 30+ years)!

@A_Man_Eating_Duck: Thanks for clearing!

What I do´t know is how to get a report about my WAV files. However now l´ll try to convert to FLAC and then see if I can get more information by the way.

Thanks.

WAV files are going defect

Reply #20
However now l´ll try to convert to FLAC and then see if I can get more information by the way.

Why? FLAC encoder won't detect corrupted WAVs.

WAV files are going defect

Reply #21
Is there really no way to test whether a WAVE file is corrupt? After all, it is a container format ...


However now l´ll try to convert to FLAC and then see if I can get more information by the way.

Why? FLAC encoder won't detect corrupted WAVs.

And, no matter whether it was fed garbage, will result in completely valid FLAC files (containing the garbage of course, not what one wanted).

WAV files are going defect

Reply #22
OK, so everything is backed up - without any error messages? That is strange if the hard drive has issues that corrupts a file.  Except for one thing: the dreaded Windows Delay Write, that ruined quite a few files for me.
Are there any log files, BTW? What was used to rip? Anything that doesn't match the length in the log files, should be wrong. Or at least highly suspicious.

Using CUETools or dBpoweramp's Perfect Tunes might verify rips to be OK: those who get out with thumbs up, are fine.  But there are lots of perfectly fine CD rips you cannot verify with the AccurateRip database that way, because the CD was pressed with a pregap of not the "correct" two seconds. Both CUETools and PerfectTunes will be out of luck to calculate the AccurateRip ID then.  CUETools has the advantage of looking up its own (less populated!) database where the disc IDs are calculated differently - the more chances the merrier.

Of course if the corrupted files have wrong length, they will not be found. But eliminating the ones that are verified, reduces the haystack size.

WAV files are going defect

Reply #23
Is there really no way to test whether a WAVE file is corrupt? After all, it is a container format ...

Usually the first 44 bytes of a WAV file are its metadata: data size, samplerate, bitness... but no checksum. The rest is raw LPCM data.

WAV files are going defect

Reply #24
That's why I always calculate the checksums of the wav files before converting to flac or any other lossless format.
I use CRC32, but ofcourse you can use MD5, SHA256 or whatever you like, and store that in a text file in the same folder as where you put the music files in. That way you can always check, after copy operations or when decoding whatever lossless format back to wav if the files are still the same.