Page 1 of 1

[SOLVED] Import raw file with multiple wave headers

Posted: Thu Jun 30, 2011 11:36 pm
by Sprinterdriver
Hi.

I have some raw audio files here that is really just several wav files that is joined, in adition to some extra metadata.
I know this because I tried to open the file in a hex editor. The header "RIFF" exists on multiple places in the file.

The first thing I tried was to use hex editor to find the first ocurrence of the header. Then extract the contents from there and to the end of the file. So I get a resulting file that is almost the same size, it does have a valid riff header AND its just several joined wav files.
When I open this file with multiple riff headers, then Audacity opens only the first sound.

That is, if file size is 20Mb, then Audacitu just reveals two second - the first sound.

Questin is: Can I extract the rest of the sounds using Audacity?
If not, is there possible other software that can do?

Thanks

Re: Import raw file with multiple wave headers

Posted: Fri Jul 01, 2011 1:45 am
by Gale Andrews
The first RIFF header is still dictating the length of the file, so if you use File > Import > Audio the headers will be read and the file will only be deemed to be the length stated in the first header.

Use File > Import > Raw Data then the headers will be ignored for determining the file information (the headers will still present themselves as a visible and audible click). To avoid that, open the file in the hex editor and remove all the headers, or simply silence or delete the click in the imported raw data then export as WAV.



Gale

Re: Import raw file with multiple wave headers

Posted: Fri Jul 01, 2011 3:13 pm
by Sprinterdriver
Hi. I think that wouldn't be successfull because, like you said - the first heeader determine the length.

Is there a way to obscure the header in a wav file so that the program doesn't know the length?

Re: Import raw file with multiple wave headers

Posted: Fri Jul 01, 2011 3:24 pm
by steve
Sprinterdriver wrote:I think that wouldn't be successfull because, like you said - the first heeader determine the length.
As Gale said, if you Import Raw, then the header data will be ignored and the entire file should be imported (with audible and visible clicks where the header data occurs).
Have you tried it?

Re: Import raw file with multiple wave headers

Posted: Fri Jul 01, 2011 3:29 pm
by Sprinterdriver
steve wrote:
Sprinterdriver wrote:I think that wouldn't be successfull because, like you said - the first heeader determine the length.
As Gale said, if you Import Raw, then the header data will be ignored and the entire file should be imported (with audible and visible clicks where the header data occurs).
Have you tried it?
Yes. But for some reasons I got just ugly sound (suspect bit shift) for some of the wav files, when other sounds fine.

For those ugly ones, I doesn't succed to reveal the sound. I'll try a bit more

Thanks

Re: Import raw file with multiple wave headers

Posted: Fri Jul 01, 2011 6:52 pm
by Gale Andrews
Sprinterdriver wrote:I got just ugly sound (suspect bit shift) for some of the wav files, when other sounds fine.
If someone has concatenated WAV files that have different bit depths or sample rates then you could possibly Import Raw several times, adjusting the "Import Raw Data" settings each time to match each component file. Then cut and paste the correct part of each imported track to a new track and export the new track.



Gale

Solved - using simple vbs script file

Posted: Fri Jul 01, 2011 7:43 pm
by Sprinterdriver
Hi.

I just like to say problem solved.

I found that windows vbs could read chunks of raw data as well as plain text. So I managed to make a vbs file to extract the wav files.

Too bad I did this in vbs. Should have choosen java. vbs is slooow.
It process the files about one third of play speed.


Thanks for your interrest.