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: How to fix "corrupt" 8-bit WAVs? (Read 2259 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How to fix "corrupt" 8-bit WAVs?

I'm trying to add tags to a bunch of old 8-bit WAVs. Half of them tag successfully in Foobar, while the other half give the error:

Could not update tags (Unsupported format or corrupted file)

All the files play fine and do not seem damaged.

I decided to convert them to FLAC, which is better for tagging. They do successfully convert, however I get the error:

1 out of 1 tracks converted with minor problems.
  Indicated RIFF size exceeds actual file size, file appears to be truncated


So my question is: do these files need "fixing", and how?

I know I can import/export with Audacity but it doesn't allow 8-bit exporting, and it seems wrong to needlessly change the bit depth.

Re: How to fix "corrupt" 8-bit WAVs?

Reply #1
Quote
I know I can import/export with Audacity but it doesn't allow 8-bit exporting, and it seems wrong to needlessly change the bit depth.
Save as type : Other uncompressed files
Options -> Header: WAV (Microsoft)
Encoding: Unsigned 8-bit PCM

Re: How to fix "corrupt" 8-bit WAVs?

Reply #2
Quote
I know I can import/export with Audacity but it doesn't allow 8-bit exporting, and it seems wrong to needlessly change the bit depth.
Save as type : Other uncompressed files
Options -> Header: WAV (Microsoft)
Encoding: Unsigned 8-bit PCM
Yay, it worked! :) Thanks so much Doug! God bless you :)

Re: How to fix "corrupt" 8-bit WAVs?

Reply #3
Oops, spoke too soon... That does work, but it doesn't seem to fix the problem! I still get the same errors when I try to either add tags or convert to FLAC!

 

Re: How to fix "corrupt" 8-bit WAVs?

Reply #4
Quote
! I still get the same errors when I try to either add tags or convert to FLAC!
With foobar2000 or with Audacity? 

If you can open the file in Audacity (and if it plays) you should be able to export to FLAC.  And since Audacity makes a completely new file there's no reason for it to be corrupt.

If you can't open the corrupted file in Audacity, try opening it as RAW.    The header and tags will be read as audio, so you'll have to trim-out the "noise" but if just the header and tags are corrupted and the audio is OK, you should be able to make a new file.

I don't know much about tagging WAV files.  I only know it's not widely supported (and it may not be well-standardized).

Re: How to fix "corrupt" 8-bit WAVs?

Reply #5
Quote
! I still get the same errors when I try to add tags or convert to FLAC!
With foobar2000 or with Audacity?
With foobar2000

If you can open the file in Audacity … you should be able to export to FLAC … there's no reason for it to be corrupt.
You're right, when I use Audacity to export it as a FLAC, it reports no error (unlike when I use foobar2000 to convert to FLAC). The only downside is that Audacity can't export FLACs at 8 bit, so I am changing the bit rate and the compressed files are actually slightly bigger.

It's not really a big deal though. I'll go with this.

Thanks again Doug :)

Re: How to fix "corrupt" 8-bit WAVs?

Reply #6
Does FLAC even support 8 bit?

By the way, FLAC recognizes the bit depth, even if you feed a 24bit file with 8 bit data in it, the redundant bits get truncated anyway an a block basis. LossyWAV makes advantage of this (but that's offtopic in this regard).

Re: How to fix "corrupt" 8-bit WAVs?

Reply #7
You could add the --ignore-chunk-sizes to the FLAC encoding parameters.
lossyWAV -q X -a 4 -s h -A --feedback 2 --limit 15848 --scale 0.5 | FLAC -5 -e -p -b 512 -P=4096 -S- (having set foobar to output 24-bit PCM; scaling by 0.5 gives the ANS headroom to work)