Log in

View Full Version : AVS helped to "recover" a dead video after disk crash! :-)


CirTap
4th June 2005, 01:54
Hi,
so this one's neither a how-to-do-this-or-that question nor a that-aint-working complain, but a little report on the "life-saving" performance of AviSynth on a virtually dead 15gig AVI that happened to sit on some bad clusters of an external USB2 hard disk.

When the MEPG encoder stopped responding I initially didn't realize and though that there could be an issue with the drive - well, there was: windows reported "insert disk in drive R:" (?) oops.
the whole drive "disappeared" in device manager.
After a restart any application I tried crashed at the very same position of the movie, one also reported an I/O error and -- drive was gone again.
No good.
Any disk tool I tried to clean up the drive gave up.

Then I wrote a script to read some frames from the obviously dead movie, and loaded it into VirtualDub -- it coudn't get worse.
It worked! No crash -- me happy -- for now.
I narrowed the frame numbers down to the position where all the other apps died, and so did AviSynth, precisely at frame # 2705 :), but now I knew where to stop and had the first 2704 perfect looking frames. "Save as AVI" ... -pew-
I continued with some large offset (20000+) and blindly hopped over the bad parts - it played; started to Trim() the movie from the very end - trial and error again: worked, too, and then literaly tip-toed from the "other side" to the broken parts directly in VDub and noted down the good sections.
After about another dozend VDub/AVS/HD crashes I came out with a script that trimmed and joined all the good parts back together except for some ~25 sec. in total with the "killer frames".
I finally let VirtualDub write a new AVI from the various chunks I put together with AviSynth to another disk.
There are a few very short hick-ups where I had to "jump" over the bad data, but the movie's basically back!
Thanks to AviSynth and VirtualDub!

I just though I let you know that those tools can be a helping hand in data recovery, too :D

... now, its time to low-level that hard drive to mark those bad clusters.

Have fun,
CirTap

Seed
4th June 2005, 05:31
> 15gig AVI

For most bad sector data corruption in AVI files, I can usually get away with Vdub alone.

Launch Vdub. Set "Error mode" under both Video and Audio as "Conceal errors and resume...". Load your avi file, and choose "Scan Video stream for errors" under "Video". Vdub will scan through the whole file, pausing quite a bit when encountering bad sectors. At the end, it will display on status bar how many frames "bad" or undecodable". You can then save the displayed avi with direct stream copy as a new AVI - without all those trials and errors, and in one piece.

CirTap
4th June 2005, 09:30
Seed,
well, the thing is, *any* software, incl. sector readers, disk analyzers, 'data recovery tools', chkdsk, contig, and alike totally skrewed up as soon as they touched one of the (probably) physically detroyed sectors on the *harddrive*. VDub did so too, even with error modes active: the distruction was just beyond its control :) The disk is connected via USB2, so there's not much "BIOS awareness" by the PC to recover from this kind of bad I/O - I think. All its partitions literally disapperead in XP and the disk storage thing (dunno it's english name) in "manage computer" even offered me to re-initialize (partition and format) the "new hard drive" whenever the crash happened ... I actually just had to disconnect the drive, power it off/on, re-plug and all was fine to proceed with the next few frames. Tedious.
I did find the working parts with VDub and then just used AviSynth to create a "cut list" put them back together as both tools work "frame accurate".
I meanwhile managed to put in the missing parts from a smaller "preview proxy" version I still had on a backup usually make for Cubase to redo the audio parts. They are a bit bluriere after I scald them up again and have a smpte code on it :), but its a just a few seconds they appear.

Have fun,
CirTap