Recovering an audio file...

Rylan Zolinski

Well-known member
I used a Zoom H1 recorder. The battery died before I was able to swap in a new one and a result, the recorded audio was never saved onto the card properly. It shows that the file exists but has a file size of "0 Kb." I've heard of people recovering a file like this successfully.


Anyone run into this problem and was able to solve it? I tried a few searches and came up with a few results but I can't seem to find a solid workaround for this.
 
I have recovered files which do not have a TOC (typical of sudden power failure) and other formatting and corruption problems.
Download the file to your hard drive and change the extension to <.raw> . This should open in an audio editor that supports RAW audio. I use Sound Forge Pro. I'm not sure what other audio editing software will open the the RAW format. Most NLE and DAW applications will not
NOTE: This pertains to PCM files (typically WAVE). I have not tried, nor do I think it would work with MP3 or other data compressed file types.

If the file is not visible on the card, I use Piriform's Recova to access the 'lost' non-indexed file.. though sometimes the files will often have cryptic names and it takes some detective work. In any case, DO NOT record anything else to the card or the data could be overwritten, making recovery impossible.
 
On a Mac I believe Quatro DSP will read RAW files. Generally when you open a raw file you need to know the sample rate and bit depth so take note of that. The other issue is that with it reading a zero bytes you may not be able to copy the data in a normal way. THe zero generally means that the file was not closed properly and so the directory was not rewritten to add the file. What you have is a placeholder for the file. SO you may need to use a disk/ card recovery application to find the actual file. Sometimes I have been able to see it (the real file is invisible in the finder) with FTP programs since they are not dependant on the GUI and can see files marked as invisible. As Rick mentioned if you do see it it will probably have some gobeldy gook name. You will have to go off the creation date and a file that is about the right size.
 
On a Mac I believe Quatro DSP will read RAW files. Generally when you open a raw file you need to know the sample rate and bit depth so take note of that. The other issue is that with it reading a zero bytes you may not be able to copy the data in a normal way. THe zero generally means that the file was not closed properly and so the directory was not rewritten to add the file. What you have is a placeholder for the file. SO you may need to use a disk/ card recovery application to find the actual file. Sometimes I have been able to see it (the real file is invisible in the finder) with FTP programs since they are not dependant on the GUI and can see files marked as invisible. As Rick mentioned if you do see it it will probably have some gobeldy gook name. You will have to go off the creation date and a file that is about the right size.

I've been playing around with the file in a few programs but I can't seem to get it to work. I used HDDGURU and did a complete copy of the SD card into a .RAW format and brought it into Audacity. I tried various settings but all I get is a few hours of interference (hissing). If there are any audio wizards in this thread that can somehow take the files that I have and come out with the missing recording (it's about 30 minutes in length), I will pay them for their work. I'm pretty much in desperation mode.

I should also note that the file recorded was in MP3 and not WAV. I wonder if this has to do with not being able to recover anything?
 
"I should also note that the file recorded was in MP3 and not WAV. I wonder if this has to do with not being able to recover anything?"
- I would suspect so. Sorry.
 
"I should also note that the file recorded was in MP3 and not WAV. I wonder if this has to do with not being able to recover anything?"
- I would suspect so. Sorry.

Damn. Oh well. This was one of my first big gigs since moving to this area and I flubbed it.
 
Damn. Oh well. This was one of my first big gigs since moving to this area and I flubbed it.
Lesson 1: Never, ever, record to mp3. MP3 is a distribution format, not a origination format. Memory is cheaper than dirt and using a lossy compression format for original recordings is false economy.
 
Lesson 1: Never, ever, record to mp3. MP3 is a distribution format, not a origination format. Memory is cheaper than dirt and using a lossy compression format for original recordings is false economy.

Hear ya loud and clear. Other than reasons I posted, is there any other reason why choosing a WAV is better? I mean, technically it's a superior format but can you really hear the difference?
 
Hear ya loud and clear. Other than reasons I posted, is there any other reason why choosing a WAV is better? I mean, technically it's a superior format but can you really hear the difference?

Ever taken compresed video and re-compressed it into another format? Even if the bitrates are the same it will look *terrible*. The same happens to audio--it's compressed, then you edit it, then re-compress it into MP3, and the compression artifacts add on top of each other. Not good. Record in WAV, distribute in MP3.
 
I've been playing around with the file in a few programs but I can't seem to get it to work. I used HDDGURU and did a complete copy of the SD card into a .RAW format and brought it into Audacity. I tried various settings but all I get is a few hours of interference (hissing). If there are any audio wizards in this thread that can somehow take the files that I have and come out with the missing recording (it's about 30 minutes in length), I will pay them for their work. I'm pretty much in desperation mode.

I should also note that the file recorded was in MP3 and not WAV. I wonder if this has to do with not being able to recover anything?

It's not clear to me what is going on.

You have a corrupted memory device, that was in the H1, and at some point power died, and that left an 'empty' file as indicated by the 0K byte length.

I have an H4, and I presume that the H1 uses a similar MSDOS/FAT/VFAT format for the memory device.

As such, the 'recovery' tool should have allowed you to create an image of the memory device on your computer disk, and then processed that image to 'find' files.

There are a couple of ways that can be done.

One is looking at the 'directory' that is found in the image and 'guessing' which file was being last written. The recovery tool may give a date stamp along with a 'funny' name and a length that looks 'right' for a long recording.

The other way is to search the memory image for something that 'looks' like a media file, since most formats have some sort of initial sequence of bytes that is somewhat unique.

Hence one can 'recover' JPEG, WAV, MOV, AVI, etc. files by their 'tag'.

The problem there is that some file systems, like most modern file systems, do not save file data in contiguous blocks.

However, for these low end embedded deals, using the FAT/VFAT disk/memorydevice formats, most often do record the data to sequential blocks on the device, and so finding the 'first block' may allow the rest of the blocks to be 'saved' in a new file on the computer disk, and then examined with the appropriate tool for that file type.

Better tools might use the allocation bits in the directory to make 'good guesses' as to which blocks correspond to what file, even when portions of the directory have been corrupted.

While I've not lost sound files, I have on occasion had corrupted Compact Flash devices, and have used some set of Mac tools to recover the images, mostly JPEG images. But the principles are the same.

In any case copying the whole memory device in to a 'raw' file, will not allow most 'audio' tools to 'find' the audio 'file'. It may very well sound like a lot of 'hissing', since the audio tool has no indication what the format of the data may be.

In particular an MP3 file played as a 'RAW' data file may sound like a lot of noise, because the compressed data is not being decoded into the corresponding audio values.

The same would be true if one put up 'raw' JPEG data on a X by Y screen window. It would look like a bunch of random values.
 
You guys are much more knowledgeable and experienced than I am, but for what it's worth I try to send a sub out to my cameras or some additional recorder whenever possible tonnage a redundant copy of the audio recording.
 
Lesson 1: Never, ever, record to mp3. MP3 is a distribution format, not a origination format.
Copy the above and read before rolling.

"is there any other reason why choosing a WAV is better? I mean, technically it's a superior format but can you really hear the difference?"
- While a first generation 320kbs CBR mono MP3 filespoken word sounds nearly identical to a PCM, each subsequent decode/encode process takes a significant quality hit. Another problem is most recorders can't record mono MP3s, which inherently has superior quality to stereo. In which the stereo file would need to be 740mbs to equal the quality of the 320mbs mono version. Obviously a mono file is only good to materiel with no spacial information.
That said, just record audio in an uncompressed PCM format
 
MP3 files are encoded and as such may not be recoverable IF and of the info needed to decode the file was lost when the device crashed.

When a drive or memory device is not shut down properly and a file is "open", depending on the OS and luck, the information in the directory of the device may not reflect how the file currently exists. This has been a big problem with some systems and not much of one with others. MiniDisks were an example of really bad planning and they only wrote back to the directory when the file was closed so anything that stopped that from happening like a low battery meant you lost the whole file.

What happens when you record is that the OS creates an empty "file" (directory entry) that will be your recording and then "records" the data to a buffer file. This buffer file is saved and it's "header info" and the directory entry are updated to point to the sound file and has all the other important bits added - like length and format etc. That is the usual way the other way is that the Program or OS creates a file of the length you specify and writes directly to it till either it's full (and it goes out of record) or you stop it and it them trims the extra off and rewrites the file. This is the ProTools way. They can both have problems if not closed properly.

In the more common mode you have a directory entry of zero bytes that points to nothing, in the less common one you have a huge file, possible all the free space on the drive.

Since generally files are not written sequentially, unless you are writing them to a freshly formatted drive, each "block" has a pointer to where the next block will start. If at any point the improper closing trashes one of those pointers the OS will treat the rest of the "file" as a new file fragment. None of these will show up in the directory and all will be flagged as available to write to. Which is why the most important first step is tho not write anything to that drive, card, etc. till you run some recovery software on it.

What you will generally get with recovery software is a new bunch of files. Some you can tell what they are and were the ones you could see before. You might also have a few deleted files that have not been over written and were still intact. THe rest are hunks of data blocks that were linked together. Those "files" can be anything from part of a deleted file that was partially over written to the improperly closed file you want. Often there is no way to tell with out trying them out.

With sound files you need to tell the opening software a bunch of things that would have been in the file header such as sample rate file format, what should open the file, bit depth, stereo or mono. With out that info the program doesn't know how to read the data.

Opening an MP3 as a raw audio file won't do you any good because it's not a raw audio file. You need something that will take your file and use it as the data in an MP3 file. There is probably a way to write the MP3 header info to the file but I don't know of anything off hand. I'm sure there are ways to do it but you might need someone to write the program. I would look first for recovery programs aimed at saving MP3 music files. They may be able to create a header on an MP3 data stream? You will still probably have to tell it what the sample rate and data rate etc was.

So to your other question of why not MP3.

One of the biggest is that long bit above. MP3's are much more fragile than a wav file, and Sh!t happens. So the simplest and most bullet proof file format has a LOT of advantages.

Second, as said MP3's have only about 1/10 of the data of a WAV file (at best) so they don't have a lot to work with if you need to fix things.

Third, you can not edit MP3 directly. So when you edit the program has to decode the file do the edit and reencode the file. THis makes the quality of your recording go down hill a LOT faster than a WAV file.

Fourth and maybe a big one also, is that the encoders on compressed formats can get fooled by some sounds. With MiniDisk and ATRAC encoding and probably MP3 sounds like a siren going by (Doppler effect) or Bagpipes can send the encoder into a fit and what you get sounds like some weird SiFi SFX. It's hard to tell what your particular encoder is not going to be happy with but whatever it is you SOL when it happens. This has come up with people shooting HD video with cameras that were recording audio in compressed formats.

On a personal level I have had to recover terabytes of data off of all kinds of drives over the years. We had a program glitch and trash seven library drives in about 30 seconds once. It took weeks to recover the files. All of the WAV files came back. Most of the video files came back, only a few of the MP3's came back. Part of the MP3 problem was that we had copies of most of them and it was far faster to copy that to try and rebuild them.

We did have backups for basically everything but it was in the middle of a mad rush and there was some confusion on an editors part as to what he had not touched between backup and crash. So the recovery was mostly to see what we didn't have backed up.

Anyway I consider MP3 a "disposable" format and don't save anything in it that I don't have in a more secure format or can not easily replace.
 
Back
Top