[Flac] Flac woes

Scott F graue at oceanbase.org
Sun Jun 10 10:05:19 PDT 2007


"Free Lunch" <freelunch at gmail.com> wrote:

> I did a search on the error message and found someone else with a
> similar problem and Josh's reply said:
>
> > but the wave file seems invalid.  sample data is supposed to be
> > padded to an even number of bytes.
>
> The gotcha here, as I have tried to explain in similar cases before,
> is that we do not live in a perfect world.  Many of us record audio
> and are unable to control whether a piece of hardware crashes and
> leaves the end of a WAV perfectly aligned or padded.  In this case the
> recorder (Alesis hd24) did not crash, it apparently just doesn't pad.
> Since these are original audio masters being backed up, editing them
> isn't a viable option.

I'll add my vote to this; it would be nice to have
an option that would encode these broken wav
files. It's a pity some recorders are so badly
engineered, but not terribly surprising in our
modern world.

> A bug was filed on that a couple years ago but apparently the fix
> didn't make it into 1.1.4.  If the header says the WAV is only 50
> bytes, then flac will only archive 50 bytes and will omit the rest of
> a file.  Oh, your WAV was 1GB? Sorry, that audio is not part of the
> archive. What, you deleted the WAV and only have the flac archive?
> Well, I guess you should have noticed the message that indicated your
> audio was being discarded:
>
> WARNING: skipping unknown sub-chunk 'PAD '

Are you saying the audio is hidden inside a chunk
called "PAD "? What kind of a wav file has audio
hidden within a padding chunk?

You know, FLAC encodes only audio, and uses the
file only as a vehicle for getting that audio. So
I think it's justified in throwing out a padding
chunk. What behavior would you prefer?

> Yep, that's all the warning you get when flac discards potentially
> massive amounts of the original WAV simply because the header doesn't
> match the contents.

You can use the --warnings-as-errors option.

> Also, I get the legacy wave warning very frequently.  It isn't clear
> what the issue is there?

WARNING: legacy WAVE file has format type 1 but bits-per-sample=24?

Some of my programs' wav files get that warning,
too. I just looked into that, and apparently
Microsoft's latest spec urges the use of an
alternate header format (WAVE_FORMAT_EXTENSIBLE)
for bit depths other than 8 and 16.

I'm not sure why, as I know of no program that has
trouble with these 24-bit files, and no program
besides FLAC that warns about them. Other wave
file documentation I've seen -- for example,
http://www.sonicspot.com/guide/ -- doesn't include
that restriction. I guess this warning could be
removed without harm.

Regards,
Scott / Graue


More information about the Flac mailing list