Regular Rep: 6 Joined: 20 Nov 2004 Posts: 1,286 | I wrote a post about this kind of problem before in this thread http://www.moviecodec.com/topics/8907p1.html (first three posts)
Before you do anything make sure you have more than one copy of the file just in case anything goes wrong. If you can’t play the video at all in Media Player Classic, AVIPreview, or VirtualDub (you might want to check one last time), it means the file header is missing (not the end). Believe it or not, many times the header is the last item written to an avi (because it’s only when you’re done that you know certain things, such as duration or file size).
You might first want to take several sample videos with your cell phones, and find out the specs of the videos you’ve created (video codec (fourcc), audio codec (tag number), resolution (lengthxwidth), frame rate, bitrate, audio sample rate, number of audio channels (mono or stereo), etc. You may need to use a diagnostic tool like gspot or avicodec to help you.
1. Next, make a sample video with the *exact same* specifications as above (frame rate, quality settings, etc. etc.).
2. Make three folders on your desktop. Name them folder1, folder2, and folder3 (for example).
3. Copy (don’t move - you want more than one copy just in case anything goes wrong) the corrupted video to folder1. Once it’s in folder1, rename it blah.avi for example.
4. Move a sample video (with the exact same settings as the original) that you just made to folder2. Name it blah.avi (it’s got to be the same name as the file in folder1).
5. Next get MasterSplitter and install it. http://www.tomasoft.com
6. Run MasterSplitter from your start menu and go to folder1 and pick your file, then split it into 50KB** segments. Go to folder2 and do the same. If the file is really large you’ll get lots of segments, but that’s ok.
7. Go to folder1, find blah.avi.001, and move it to folder3.
8. Go to folder2, select all the files *except* blah.avi and blah.avi.000 and blah.avi.001 and move them to folder3.
9. Get back to MasterSplitter, go to the join tab, go to folder3, and open blah.avi.001, then click join.
10. The final file (blah.avi in folder3) should be playable, or at least seekable, in VirtualDub***. You can attempt to save it by selecting video, direct stream copy, then file, save as avi (I’m NOT sure this will always work). Or you can pick video, full processing mode, then video, compression, and pick your favorite codec, and recompress it (then file, save as avi).
* Basically what we did was we took the header of a working avi (with all the similar characteristics (codec, frame rate, resolution, etc.)), and attached it to the body of a corrupt avi. It’s like attaching a head to a body in a surgery.
** 50KB is just a guesstimate. Depending on the codec, resolution, bitrate, and frame rate, you can make this value bigger or smaller to fit your needs. If your frames are really big (low or no compression and large frames) you may not be able to fit the first frame in, so you may have to make the number bigger. If your frames are tiny and very compressed, that number could be too big and you may miss too much of the beginning, so make the number smaller. (Of course in this kind of operation you may lose the first, or some of the first few frames, that’s to be expected.)
*** If anything goes wrong while opening in virtualdub, try these steps: Click file, open. Select blah.avi in folder3 (don’t double click it). At the bottom check “ask for extended options after this dialog”. Check “re-derive keyframe flags” and “open in avifile compatibility mode" |