Corrupted DivX file with missing header

Hi there.

I was capturing a video with a webcam and my computer turned off acidentaly. Now i got a DivX AVI without header... 35Mb wasted! I saw that no program can read this file, some programs are saying that it is '0' FourCC, but it’s a REAL file and I KNOW that it is a DivX 5.1.1 AVI file and I got other videos that i did using the same program.

With this information can i try to repair or fix the file? I even tried fix in coping/pasting the start and the end of good DivX AVI files in the bad one.

Can anyone help me?
Thank you very much for the atention and sorry about my english! reply


ADVERTISEMENTS

>> I even tried fix in coping/pasting the start and the end of good DivX AVI files in the bad one.

Impressive!

I’m not guaranteeing results with these steps, but they are worth trying.

First get MasterSplitter from http://www.tomasoft.com and VirtualDub from http://www.virtualdub.org

1. Make 3 or 4 copies of your corrupted file!!! It’s very easy to go awry with this and overwrite it, so it’s best to keep several copies. mark one or two as “never touch”.
2. Make 3 folders. name them '1', '2', and '3'.
3. '1' is going to have a copy of the corrupt video. '2' is going to have a good video you’re going to produce. '3' is going to have a rebuild.
4. Copy your corrupted file to '1'.
5. Make a video with the exact same video settings* as your corrupted file. Save it with the SAME NAME as your corrupted file. From now on I’ll call it 'copy 2'.
6. Move 'copy 2' into folder '2'.
7. Open MasterSplitter. Browse to folder '1' and split the file into 50 kb** segments (you’ll get a lot of parts - don’t worry about it).
8. Do the same as 7. but do it in folder '2'.
9. Copy everything from '1' [corrected] to '3' EXCEPT the original file and the .000 file.
10. Copy the .001 file from '2' [corrected] to '3'. Overwrite if necessary.
11. On MasterSplitter go to the 'join' tab. browse to the '3' folder and select the .001 file. Then click join.
12. Open the resulting file in '3' in VirtualDub.


* These kind of settings: resolution (like 176x144, 320x240, 352x288, etc), color depth/pixel format (rgb24, rgb16, yuv9, other), codec settings.

*** In my testing 50 KB worked with 320x240 RGB24 video. You may have to tinker with the size for different resolution or depth videos.

[corrections added 08/12/05] reply

Feedback


Ok, it worked!

Just a correction, i got ONLY the .001 from folder '2' and pasted on folder '3'. The other files should be from folder '1'. [Thanks - I just made the correction on the above post. - anonymous] It worked nice when I opened it on VirtualDub.

Thank you very much!!

-Ivan reply

Feedback


hi,
i have got this same scenario with a corrupted file except that part corrupt is the footer or the end 512kb of the video.
Should i just do the above procedure and just replace the last file with a good 512kb ?
Thanx for your help. reply

Feedback

ADVERTISEMENTS

(To Nithin)
Unless you absolutely need to recover the last 512KB of the file just play it in Media Player Classic, AVIPreview, or VirtualDub. All of those can play corrupt/incomplete AVI’s if the header is intact.
If you just wish to salvage the file, minus the corrupt last 512 KB, (so you can play it without needing an alternative player every time) open the file in VirtualDub, go to video, check 'direct stream copy', and choose file, save as avi, and pick a new name. reply

Feedback


Try the excellent program DivFix105

Search for it on Google reply

Feedback


Hello,

I also had the same problem as IVAN and thanks to anonymous I solved it. But I still have problems I would like to ask help. After I opened the file virtual Dub gave me the following errors:

!] AVI: Index not found or damaged -- reconstructing via file scan.

[!] AVI: Invalid chunk detected at 1470422. Enabling aggressive recovery mode.

[!] AVI: Keyframe flag reconstruction was not specified in open options and
the video stream is not a known keyframe-only type. Seeking in the video
stream may be extremely slow.

How can I correct these errors? Seeking in the video stream is really very slow?

By the way I would also like to ask How can I extract a part of the movie from the whole ?

Thanks alot,

Best regards, reply

Feedback

ADVERTISEMENTS

(To neon)
It’s supposed to give you those errors. VirtualDub will give that error message and scan the whole file if it finds it to be corrupt *or* of incorrect size. Now the odds that the file you produced and the original file from which you tried to add the header have the exact same size (down to the byte) is close to nil. The idea behind my earlier post is, by providing a valid header with useable correct information (codec, frame rate, dimensions, color depth, etc.), you can attempt to read the rest of the file. It’s still not a “valid” video (playable from start to end without trouble) (it’s more like frankenstein, with a different head and a different body attached together), but you at least you can read and decode the portions that were unreadable before.
But yeah, to salvage the part(s) you want:
1. Open the file with VirtualDub
2. Tentatively click video, direct stream copy (if it doesn’t work we’ll change it later)
3. on the bar at the bottom, drag the thing to where you want to start. Click edit, set selection start.
4. now drag it to the place where you want it to end. Click edit, set selection end.
5. the part you selected should be highlighted now. Click file, save as avi. It should save that portion only.
6. If it fails, you could do it with recompression instead. Click video, full processing mode. Then click video, compression, and pick a codec and adjust the settings to your liking. Then follow steps 3-5 again (or just 5 if it’s already highlighted).
Note: when you do a full recompression, if you want fast seeking, make the keyframes interval small (it’s where you select codec - check “force keyframe every ___ frames and fill in the blank) reply

Feedback


(to anonymous)

I tryed the Videofixer software and incredibly it fixed the index and interval problem of the video. I can seek through the video very fast. It now seems to have no problem.

I also tryed salvaging parts of the movie as you explained in VirtualDub . It works . Thanks very much for it.

If I wont be pain in the neck I would like to ask you something else. I have some homemade movies whos soundframes are not in the correct place of the movie. Such as some start before, some start after the location they should start. And this makes the movie very annoying? Is there any possibility to fix this?

Again thanks alot,

NEON reply

Feedback


>> I have some homemade movies whos soundframes are not in the correct place of the movie. Such as some start before some start after the location they should start. And this makes the movie very annoying? Is there any possibility to fix this?

That’s audio synchronization problems. I’m not very knowledgeable with audio, so you can google it some, or you can start a new thread in the general or audio board. reply

Feedback


Thanks anonymous,

I will inform you if I find out something.

neon reply

Feedback


does it matter if other parts of a video file than the header is missing?
--downloaded file and couldnt finish the eof and later couldnt even preview it.-- reply

Feedback


Is there any way I could use this procedure (tutorial) with a corrupted 3gp video? reply

Feedback


Hy
I now this thread is old but the problem I am facing is similar to the problem being faced by Ivan.
I have tried to apply the same solution, but the problem is the whole of the video shows a ghostly effect.
I thick the problem is that , we the total length info of the video file is not correct. The player tried to play all the frames in a amount of time specified by the 2nd video’s length.

Can any body tell me how to edit the total video length of the original video?

Thanx&Regards,
Vood00 reply

Feedback


Vood00 wrote:
Hy
I now this thread is old but the problem I am facing is similar to the problem being faced by Ivan.
I have tried to apply the same solution, but the problem is the whole of the video shows a ghostly effect.

What do you mean a ghostly effect?

Vood00 wrote:
I thick the problem is that , we the total length info of the video file is not correct. The player tried to play all the frames in a amount of time specified by the 2nd video’s length.

Assuming the “sample video” is longer than the “video you’re trying to correct”, it might, but you shouldn’t get any images past the end point. That’s why I tell people to play the result in VirtualDub, NOT a DirectShow player (like Windows Media Player).

Vood00 wrote:
Can any body tell me how to edit the total video length of the original video?

Thanx&Regards,
Vood00

If you do either a Direct Stream Copy for video or re-encode, VirtualDub should write the correct duration in the header.

P.S: You’re not very clear what you mean by “ghosting”. If you’re talking about slow-motion or video that’s too fast, there’s other ways to correct that (by adjusting the frame rate). reply

Feedback


well helpfull is this blog. so happy I found it in my search for soultions.
I was about to give up on my bad file and delete it when I came across this virtual dub soultion! so I tried it out and bang it fixed the file first time.. cool prog cheers all reply

Feedback


Virtual dub saved 2 hours of my life! Strongly recommend you try that.

benbrush.com reply

Feedback


THX! It worked! reply

Feedback


Virtualdub doesn’t play 3gp which has the same footer/header problem as AVI’s.

Any other suggestions?

Thanks you’re awesome. reply

Feedback


Related

Post Your Answer

Topic
Your reply
Your name
or log in
Verify you're human

By submitting this form you agree to our posting rules,
privacy policy and our disclaimer.