[LAU] Need help salvaging a recording

Erik de Castro Lopo mle+la at mega-nerd.com
Sun Apr 18 22:36:34 UTC 2010


Shani Hadiyanto Pribadi wrote:

> Nope, unfortunately it didn't work.
> 
> Here's the output of sndfile-info on the wav and the resultant w64
> 
> http://pastebin.com/YzPdxrNg
> 
> The resultant w64 length is only 20 minutes, just the same as the one
> that is able to be read from the wave file.
> What happens if a wav file has a size larger than 4G?  Does it stop
> writing any audio data?

It doesn't stop writing data, it stops reading. Basically you have
a file which contains > 4Gig of audio data, but the file header 
says its only 20 minutes (60001717 frames).

> Or the audio data is there,
> but can not be read because of the header length is insufficient?

The audio data is there, but the file header says it isn't.

> But
> why is the error start after only 20 minutes of audio,
> shouldn't it worked for the first 4G?

sndfile-info says this:

    Length : 4774981144
    Warning : filelength > 0xffffffff. This is bad!!!!

The length of the audio data is kept in th0x11c9c6e18e file header as an unsigned
32 bit integer and the largest number that can be store in that header
field is 0xffffffff or 4294967295. Sine your file is 4774981144 bytes
long (0x11c9c6e18 in hex), when you store something like 0x11c9c6e18
in a 32 bit unsigned integer you get 0x1c9c6e18 == 480013848.

> I saved the recordings as wavex because I thought wavex support file
> size  more than 4GiB.

It doesn't. WAVEX is just as bad as WAV.

> Speaking of file formats, do you have any recommendations for file
> format for recording?
> My choice is between w64, caf, or sun/next au. I heard au is more
> primitive, but is chunk-less,

Any of W64, RF64 and CAF (all supported by libsndfile) would be fine.
I would not recommend sun/next au; it main disadvantage is that it
has no way of storing meta data.

> w64 has more support in the windows world, which is what my friends
> using, but I can always bounce to a different format later.
> I'm  not sure what caf has to offer though, I don't understand the
> technical terms.
> 
> Here's a blog where I read it about
> http://blog.bjornroche.com/2009/11/wave64-vs-rf64-vs-caf.html

All three formats have their various flaws, and all three are fine
for most purposes.

As for salvaging this file, give me a day or two and I'll write a 
utility to drag your data out of the file.

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the Linux-audio-user mailing list