Jump to content

reddtekk

Members
  • Posts

    1
  • Joined

  • Last visited

Profile Information

  • Location
    CT
  • About
    Automation and lean manufacturing engineer
  • Interested in Sound for Picture
    Yes
  1. Hi everyone. This post guided me in successful restoration of a recording that was damaged due to power failure. I had the recorder plugged in near where the guys running the lights were plugged in, and they pulled every plug before I got to stop the recording. When I powered the unit back up, I saw a file there but it would not play back. I immediately shut the unit down and removed the card, then began to search for solutions. I didn't know much about this, but I knew that allowing anything to attempt to write to the card would be detrimental to any sort of file recovery. The recording I lost was preceded by another which I ended because the battery pack I was using to run the FR2 was nearly expired. The above posts led me into research which ultimately guided me to the solution to recover the file, and I will summarize this research here for the benefit of others. First and foremost, I am not recovering from a damaged disk. This is resultant of a power failure during recording. This procedure may or may not be of assistance for other types of failure, and is applicable to WAV files. If this happens to you, you must do two things before changing anything around with your recorder. 1. REMOVE THE CARD AND DON'T PUT IT BACK until you're done with recovery! 2. Install a DIFFERENT card in the recorder and record a short file. It does not need to have any content, but does need to have the same exact settings regarding bits/sample and samples/second. Stop the recording and allow the recorder to finalize the file normally. Using your computer, download a hex editor, and familiarize yourself with the structure of the WAV file. I found this website very informative: http://soundfile.sapp.org/doc/WaveFormat/ The hex editor that I used is HxD. It is freeware and is very powerful. I had tried Frhed but it has trouble opening large files. I did use Frhed to save an exact (raw, complete) image of the flash card on my hard drive. This is probably not necessary but since I was working blind I decided that it would prevent me from screwing up the original. HxD is capable of the same, and it can open an entire disk at once. This IS necessary. Since I lack familiarity with other editors, I will use HxD for this write-up. I chose to make a second copy of the image as a working copy. This way if I screw it up I simply delete it, and make a new copy. As far as I can tell, the FR2 makes a file as a place holder and then begins dumping raw data on the disk immediately following it. If you had pre-record enabled, the sound data for the pre-record would go right after the place holder file, but it was held in RAM and is not recoverable if the recording is not properly finalized. The chunk of data allocated for this will be all zeros. Now open the entire disk (or disk image) in HxD. Using the "find" tool, search for hex value "00 00 00 00 00 64 61 74 61 00 00 00 00". This should take you right to the place holder file. Right after the characters you should see a bunch of gibberish (or a bunch of "...." if you had pre-record enabled). If you had pre-record enabled, place your cursor within the 00's following "data". Search for a hex value other than zero. I used FF. This should get you in the ball park but you may need to scroll up from there to find the beginning of the data. Where the 00s end and the gibberish begins, congratulations, you've very likely found your data. Place your cursor on the first byte of the data. Jot down the offset indicated at the lower left of the screen. Now start a search for 6 bytes of zeros ("00 00 00 00 00 00"), searching forward from your current offset. This should take you to the end of the data as it's pretty unlikely that you'll have that many consecutive zeros within the data. Place your cursor on the last non-zero character and again note down the offset. Next we need to select the data chunk. Use Edit > Select Block. For beginning, type in the hex value of the first character of the data. Enter the offset of the last character of the data as the end of the selection. Jot down the length of the chunk in hex. It is displayed on the lower information bar of HxD. Circle this number as you will need it shortly. Choose File > Save Selection... and save the selection as something you'll remember. I used data.bin Now we need to open the audio file you recorded using the different memory device. We'll fetch a header from this and use it to complete the WAV file. Open it using HxD. Explore the beginning part of the file. As you scroll down, you will eventually get to the beginning of that gibberish we saw before, and you should see "data" at the beginning if you look carefully. Put your cursor on the FOURTH BYTE following "data". Jot down the offset. Edit > Select Block. Begin at zero and end at the offset you just wrote down. Save this selection as before. I used "header.bin". Add hex "10 00" to the number circled. I am using the "programmer mode" in the Windows 10 calculator. Jot this sum down. Open your "header.bin" file in HxD. The first characters are RIFF followed by four characters of gibberish. You need to replace the hex values for these characters with the sum you just calculated, but it goes in sort of backwards. Let's say your sum was 01 23 45 67. You would enter 67 45 23 01 following "52 49 46 46" (RIFF in hex). Now locate "data" at the end of your file. You should see four characters of gibberish after it. In the same backwards fashion as above, enter the number you circled in place of those four bytes. Don't close the header. Open the data.bin file as well. Go to Tools > File Tools > Concatenate Assemble the header file first then the data file. Save this as a .wav file. I used "recovered.wav". You should now be able to open the file in an audio player. If you just hear static, read a little about the file structure in the website I mentioned above. You may need to put some zero bytes at the beginning of the data chunk in order to bring everything into alignment. For me, this worked on the second shot. Hope that one day this helps someone
×
×
  • Create New...