TV Timecard and Sound Report Writer apps

Tuesday, August 6, 2013

WAV Goodbye To File Corruption

location sound mixer dallas, tx
They say that power corrupts. I had never really given that much thought until my 788T froze on me a few days ago. At the end of a 1 hour, 8 minute clip, my unit ceased to function. Running firmware v3.0, I incurred the fatal (Please power cycle your unit) error. I pressed the power button and it immediately blanked out. I didn't have to remove external power or anything, which I found odd from previous lockups. I turned the unit back on and everything worked like normal. While doing my sound report at the end of the day from the CF card, I noticed that the take that incurred the error did not import into Wave Agent. I inspected the file itself and it showed a correct file size of 3.53GB, but the duration was 00:00. "Uh ohh," I thought to myself, "This can't be happening." So of course I went to my INHDD to access that recording and it showed the same information. My file was corrupt. Absolute power does indeed corrupt absolutely. Or does it?
location sound mixer dallas, tx
Corruption at its finest

I tried to playback the file in every piece of software I had available, including Finder Preview, VLC, FCP, Audacity, and many more. Every playback attempt resulted in the same result – failure. I had to deliver the news to my EP that we lost all multitrack audio for the single most tense and important scene in our episode: The Reveal of a Catfish. We checked out what audio we had in every on all 9 cameras, which are all camera mics except for our primary A-cam, which had wireless camera hops with a 2-ch. mix from me. We knew that the first 45 minutes or so we did not have the mix on A-cam because we were shooting car-to-car, which doesn't use A-cam, and then also we had some sort of a hop transmission error (that's another story in and of itself). Our show is "sooo documentary" that 6 of the 9 cameras we use don't have any XLR inputs, and only one channel of the others had any sort of external camera mic mounted. Our options were severely limited. Our EP decided to send all the footage off to be cut together and see how bad it would sound. In the meantime, others were working on trying to repair or restore the WAV file somehow, including myself. I researched a few pieces of software that had a good reputation in repairing various formats of audio, but at the end of the day none of them worked. We also were in the process of getting the actual CF card to a data analyst as another option. This was a little outside of my area of expertise, but it was also my responsibility as the Sound Supervisor to ensure that we have proper redundancy so that we don't lose anything. As far as I was concerned, I covered my ass by recording simultaneously to both internal hard drive and compact flash, not to mention sending a 2-channel mix to our A-camera. Turns out, that wasn't good enough. I failed the people that trusted me the most with their production, and that is what I felt terrible about. Our delicate content isn't something we can simply re-shoot like most shows. It was never even a consideration.

I sent Sound Devices the setup file, with which they confirmed that it wasn't operator error in terms of machine settings. We were in Michigan at this point and it wasn't terribly hot. I was certain overheating wasn't the cause either. Regardless, it failed and I wasn't sure that it wouldn't happen again. I've experienced lockups or other recording errors with various units, but they always preserved the take without any corruption. Now I was concerned that it was going to happen again before I could get a replacement. The point is that this can happen to anyone, anytime no matter how much you take care of your gear or prepare yourself.

After a much deserved tame verbal lashing by my superior after finding out how little I was personally involved in the repair process, I was hard pressed to find a solution to this mess. I started with a program called Sample Manager, which I found as a batch audio processing and export tool. It also has a great diagnosis and repair function built in. I was actually quite optimistic that I'd be able to repair it as I went through the process. It would find and error and present a couple of options on how it would repair it. One thing led to another and the end of the road was the grab you see to the left, saying "The audio file cannot be repaired." Oh, well. On to the next.

One of Sample Manager's suggestions was to use a file editor to modify the file. So I started looking into available file editors, also called HEX editors. These will basically give you the ability to edit the metadata that codes the WAV file. Sample Manager suggested xED, but I also found HxD to be good software for this purpose as well. It turns out that WAV files are relatively simply constructed, which is one reason they are so reliable and popular. One Creative Cow discussion led me to a fantastic pool of information on the architecture of the WAV format compiled by Standford, found here.
location sound mixer dallas, tx

This was a little too advanced and time consuming for me to tackle in one night, so I continued looking into other options. One search on "repair corrupt WAV file" led me to a feature of Audacity that allows it to import raw data into the program. It's designed so that Audacity can read virtually any kind of uncompressed audio format by only using the data sub-chunk of the file (basically the audio itself, not everything else that packages the audio into a readable file format). So I gave it a whirl by doing just 1% of the file since it was so long and OH. MY. GAWWD. It was a miracle from above. It read all 9 tracks in my PolyWAV file!! They sounded pristine as I had recorded them. When I played the file back, it felt so good. I remember the words of when I started recording. "Have you tried this yet? It's soo good. You're gonna love it!" The cast member was offering some amazing dessert that our lunch location gave him. Hearing this audio in this condition and not on a GoPro camera mic gave me the chills. I was ecstatic! I closed out the project, created a new one and imported 100% of the file length. After 10 anxious minutes the process was complete. Every second of the audio was there on all 9 tracks. None of the metadata was there though, but I wasn't too concerned with timecode and track names at this point. Three of the tracks were recognized as stereo PolyWAV tracks, but I just left it all as is. I listened to the newly created files, renamed them to their correct names and then batch exported them as new MonoWAV files uploaded to my server IMMEDIATELY. Demo embedded after the break.

I could have gone one step further and added the timecode and recompiled in Wave Agent, but I cut a few of these corners primarily because it was 4am at this point. Uploading 4GB over shitty hotel internet speeds was already cutting it close before we left for the airport at 9am later that morning. I sent the e-mail notifying Post and everyone that had been involved on finding a solution, including my EP. This was such a relief for me. I knew it wasn't my fault, but it was my responsibility. I am just happy to have taken the burden off of my EP, who could have been in deep water had he delivered sub-par audio on his watch. I have since started putting my Zaxcom TRX900AA (for 2-channel camera hops) into loop record and taking that 2-channel mix as yet another backup. When it's on, it automatically records everything. It's a nearly fool-proof way to get another backup without much extra trouble. If aalllllll of this fails, then we have bigger problems anyways.

Nothing is guaranteed in life except death and taxes (ahem...Wesley Snipes), and that includes digital audio files. I'd rather be lucky than good any day. And that, my friends, is the story of how I still have my job.

Find Tyler Faison on Google+

LinkWithin x4

Related Posts Plugin for WordPress, Blogger...