Repair corrupt avi?

Spot|DSE wrote on 12/27/2005, 1:56 PM
Anyone got any suggestions to repair a corrupted avi?
Tape must have problems, because it's a straight 1 hour run. However, at the 12 minute point, the camera shows video in the window, but no audio. The tape and captured file play correctly up to that point. There is no start/stop point on the tape, and shouldn't have been. This is the main cam of a 3 cam shoot.
On capture, the file shows red (indicating frame issues) no video, and no audio. Audio is drawn as an sfk file, but does not actually exist, as opening said file in Forge shows me waveforms, but that won't play either.
Are there any utilities I might use to repair whatever has been written wrong?

Comments

fldave wrote on 12/27/2005, 2:26 PM
Sounds like your AVI header is messed up. Specifically, sounds like the dwLength value doesn't calculate out to the end of the file. Some programs see process it ok, some don't, some half process it.

This is the header info for all avi files:
typedef struct {
DWORD dwMaxBytesPerSec;
DWORD dwFlags;
DWORD dwCaps;
DWORD dwStreams;
DWORD dwSuggestedBufferSize;
DWORD dwWidth;
DWORD dwHeight;
DWORD dwScale;
DWORD dwRate;
DWORD dwLength;
DWORD dwEditCount;
char szFileType[64];
} AVIFILEINFO;

I just found a link re. Virtualdub that says it is very tolerant of errors in avi headers/indexes:
http://www.virtualdub.org/blog/pivot/entry.php?id=25

You might try loading it in virtualdub and re-save it as another avi, see if that clears it up.
Sidecar wrote on 12/27/2005, 3:34 PM
Have you tried playing the tape back in the same machine that recorded it?
johnmeyer wrote on 12/27/2005, 5:06 PM
doom9.org has some utilities like this one:

AVIDeFreezer

Haven't used it, so I don't know if it works. It it were me, I'd open the file in VirtualDub and use the Direct Stream Copy mode to see if I could export the first part (which you say is OK) as one AVI file, and then see if it will play beyond the bad point, and then export the remainder of the file. VirtualDub can often read files that can't be read any other way.
Spot|DSE wrote on 12/27/2005, 7:32 PM
Iwasn't aware of this app, thx, John.
Dave, I was aware of the parameters of the file, but hadn't considered Vdub.
Sidecar, I'm editing on travel, and don't have tape, or deck with me. But I don't think it was a capture issue, I think something happened on the tape itself. I don't mind losing the vid, because I've got other angles. I do mind losing the audio, because my backup for the audio is in Utah, and I'm not.
John_Cline wrote on 12/28/2005, 6:30 AM
Seems that I remember that the latest version of Scenalyzer has a "fix corrupted AVI" feature. It's not the version posted on the web site, but a version that Andreas Winter recently wrote for one of the members of this forum.

Here's the link to the message thread:

http://www.sonymediasoftware.com/forums/ShowMessage.asp?ForumID=4&MessageID=425224

John
trock wrote on 12/29/2005, 3:34 PM
Here's a few more:

http://www.videohelp.com/tools?s=12#12
fldave wrote on 12/30/2005, 9:59 AM
Spot,
Curious if you were able to save the video, and if so, how?
Dave
Spot|DSE wrote on 12/30/2005, 10:27 AM
Not able to save, I think what might have happened is that during transfer from one drive to another, only part of this file made it, and the reason I see audio is the entire .sfk file made it across in the xfer.
I had the tape fedexed out to me, did a recapture using the time data in Project Media, and it all dropped into place, even after I'd edited the missing frames based on a second camera's audio.
Vdub "saved" it as a single file, giving me black frames where it truncates, and silence where it truncates, but obviously that didn't help much.
Thx to everyone for the input, I definitely learned a new process, even if it was a failed one.
Steve Mann wrote on 12/30/2005, 2:07 PM
Don't know if it will help, but I noticed that the 12/18 version of Scenalyzer includes a tool fo fix damaged AVI files.

Steve Mann