wavfix
wavfix copied to clipboard
File does not appear to be a valid RIFF WAVE
Thank you for your work! Do you have any ideas to solve that problem?
Thank you very much!
Hi, sorry i missed your question...
Your problem comes from here, let me translate : WAV files must start with 2 sequences of 4 bytes that identify your file as a WAV file. Those bytes were always fine on all corrupted files I've been working on, that's why the absence of those bytes is considered a fatal error.
The only time I saw a wav file containing wrong first bytes was on a file containing only null bytes, meaning there were absolutely no data inside of it to restore.
Anyway, feel free to send me your file so i can check it.
Hello,
I currently have an broken WAV file from Ableton Live crash due to power outage on the sound card. When trying to repair it with wavfix, it shows the same error. As I know exactly that this is a wave file, is there a way to force it? (filesize is ~450 MB).
Hi,
The fact that the file is a .wav file doesn't mean it contains a valid file identifier.
This might be related to the way Ableton is writing files (although I doubt that).
To check this, you can open your file into any hex editor (you can find many free hex editors online) and look at the very first bytes. You should see something like 52 49 46 46 xx xx xx xx 57 41 56 45, which corresponds to ASCII R I F F x x x x W A V E.

That's the only valid wav file identifier and that's what seems to be missing from your file.
If you only see 00 00 00 00 00 00 ... across the entire file, this means your file contains absolutely no data and then there is nothing left to recover.
If you want, feel free to send me your file and I'll see what I can do, and see if I can update wavfix to your specific case.
Hello,
Currently, the broken file starts with 00 00 00 00 ..., so there's no R I F F x x x x W A V E in the beginning, however, there's still data available:
Note that the audio file can be partially recovered by Audacity, with 24 bit unsigned PCM big endian as raw data importing settings. Very bad quality, but we understand what has been said, and sometimes in the timeline we still get good quality of audio.
Here's the starting bytes of an correctly recorded Ableton WAV file made the same day with the same settings:
Should I edit the broken file by adding these starting bytes, to make it working with wavfix then?
Thank you for the detailed feedback.
We can clearly see the entire beginning of the file is zeroed, including fmt chunk and data chunk header. However audio data starts where it should.
This means Ableton is writing the entire wav headers in the end of recording, which is really not safe...
Yes you can try to edit the header, but since it does not seem to be a broadcast wav file, you'll probably have to pass audio settings to wavfix (bitrate, samplesize and channel count).
So first, you can try to write 52 49 46 46 00 00 00 00 57 41 56 45 at the very beginning of the file. That should do the job, otherwise let me know and we'll try something else.
Also you should consider doing a backup of your file before editing.
Any news ? Was it successful ?