Some AVI files which were created from the .MOV reencoding(which was captured from miniDV tapes) are not readable in Windows Media Player. With VLC Media Player I get the message "This AVI file is broken. Seeking will not work correctly. Do you want to try to repair it (this might take a long time)" I choose yes, VLC repairs it, but it is not permanent.
Saw the link http://www.makeuseof.com/tag/how-to-repair-broken-avi-files-that-wont-play-windows-only/
Tried DivFix++, but get a error message Seek error on file C:\file.avi, (error 87 the parameter is incorrect) I get the message constantly, though I unchecked the option to keep original file and also did the Strip Index before starting the operation.
1. Is there a way I can fix the broken AVI file permanently?
2. Or, do I have to reencode it from the MOV file? It was reencoded by my friend from a MOV to a AVI file using Mpeg StreamClip and i guess he used lossy compression methods. I don't have the .MOV file which was captured from the miniDV tape. He also does not have the MOV file anymore as he deleted them to conserve space. He just gave me the AVI file which he had reencoded from a MOV using mpeg stream clip. Does he have to capture the footage from the tapes as a MOV file and give that to me so that i can do a save as to AVI using mpeg streamclip?
Tried Video Fixer and Media Fixer, but they could not do it.
Any advice would be welcome.
+ Reply to Thread
Results 1 to 27 of 27
Thread: repairing a broken AVI file
Avidemux is pretty good at rebuilding dodgy files.
Just open it, then under "tools" choose "Rebuild I & B frames".
Then save it to a new file, using the default "copy" settings for video and audio.
You should get a playable file; though if it was very damaged you might not have good sync.
Thanks, did that.
Looked at http://www.videohelp.com/tools/sections/video-repair-fix
Off topic, but for Digital Video Repair(http://www.videohelp.com/tools/Digital_Video_Repair) the download from mirror direct link was flagged as Win32:Adware by by Avast Antivirus.
I chose the download from author site, asked it to check the AVI file. it said it was OK. I told it to Check errors which also mentioned it was OK. But, i cannot play the file in VLC which tells me "Avi file is broken"
Then tried, DivX repair which showed a text log with just the message "Bad Frame Report from DivxRepair" when i tried to repair the file.
Had already tried DivFix++ and it did not help.
Tried AviDemux which failed with the message "Attempt to open the C:\file.avi failed. Could not open the file"
The AVI file is of 16GB and on a external hard drive. The machine is running Win XP with 1GB RAM. Can that be causing any issues?
Any other suggestions would be appreciated.
Don't know if there are other tools at http://www.videohelp.com/tools/sections/video-repair-fix which will fix a broken AVI file as the others are for different format/purpose.
But, AviDemux which failed with the message when i chose to open the file "Attempt to open the C:\file.avi failed. Could not open the file"
The AVI file is of 16GB and on a external hard drive. The machine is running Win XP with 1GB RAM. Can that be causing any issues? The file system is NTFS on the external hard drive and machine running XP.
Any other suggestions would be appreciated.
The AVI file format cannot exceed 2 GB file size. When you capture from tapes, set your app to limit filesize or do it in segments or use some compression.
What do you want to do with the AVI's? Can't you just work with the MOV files?
The 2GB limit was overcome quite some time ago, otherwise you couldn't capture a full DV tape in a single file - which you obviously can.
Try Digital Video repair, but also be prepared for the fact that the file may be screwed.
Your other option is to use VLC to transcode the file so you can read it in other tools.
MPEG Stream clip. Unfortunately, he did not check by trying to open the AVI whether they were created properly or not before deleting the MOV file.
Have to do some editing using Windows Movie Maker to the AVI files.
Digital Video Repair to check the AVI file. It said the AVI file was OK. I told it to Check errors which also mentioned it was OK. But, i cannot play the file in VLC which tells me "Avi file is broken" So, the original error persists and for some reason Digital Video Repair cannot identify it.
http://maketecheasier.com/easily-transcode-media-files-with-vlc-player/2008/12/14 for doing that.
But, can transcoding the broken AVI file into another format like WMV solve the problem. I mean the source AVI is broken, so while transcoding will VLC fix that broken AVI file, then save it into another format like WMV? Sorry, if question is naive, but i am new to this.
Thanks to all posters who are helping with their suggestions.
VDub, but the only file I have is in AVI format which is corrupted. Can frameserving with Avisynth, into WMM solve the issue of corruption of AVI file?
Just to clarify. I have a file called "file.avi" which is broken/corrupted. I don't have the original MOV file which was used to create the "file.avi" file. I have to fix the broken AVI file and then do some editing on it.
Thanks for the advice.
That's the big question, is file.avi really broken or is the error message just misleading? You say Digital Video Repair found no errors, is this the 2 GB limit thing acting up? What about VLC, then? The only thing I know for sure is you won't find out until you try.
AFAIK, VDub will load the AVI and has tools to verify the file, might even be able to fix it. As for AVISynth, it would be the easiest way to go, just don't know if WMM works with it and how it would handle corruption.
VLC gives me the error message"This AVI file is broken. Seeking will not work correctly. Do you want to try to repair it (this might take a long time)". Windows Media Player cannot open it at all.
guns1inger clarified above that AVI can be larger than 2GB. So, what limitation of 2GB are you referring to? Do you mean Digital Video Repair cannot process files larger than 2GB?
Digital Video Repair, Div X Repair, Div Fix++, AviDemux. What other repair tool can i try?
VDub opens a window called AVI Import filter which is currently reconstructing the missing index block leading me to believe the index file of AVI was absent/corrupted.
I am opening the AVI file with VirtualDub which opens a window called AVI Import filter which is currently reconstructing the missing index block leading me to believe the index file of AVI was absent/corrupted.
There were two messages after VirtualDub was done processing "AVI: Index not found or damaged - reconstructing via file scan. 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. "
Now, as VirtualDub has opened it and I am trying to save it as a new AVI file hoping the new AVI file would have the proper index.
What do you think i should do ? Would the new AVI file be OK?
Also, the AVI file was originally on a MAC formatted external hard drive. I copied it to a Windows NTFS formatted external hard drive. Don't think that would disrupt anything, but just thought of mentioning.
Thanks for the advice.
Last edited by p_s_92; 26th Jun 2010 at 19:56.
I don't know whether anyone is still following this thread, but FWIW, I just had the AVI broken index problem this morning, and tried running the broken file through Any Video Converter, from AVI to AVI, and the resultant file seems to work without problem in VLC. In fact, the subtitle SRT and ASS files still seem to be in sync.
I set the output to "Customized AVI Movie", with the following specs:
Video Code: x264
Frame Size: Original
Video Bitrate 768
Video Framerate: 29.97
Audio Codec: mp3
Audio Bitrate: 128
Sample Rate 44100
Output looks as good as the Input did, once VLC played its "fixed" file. Got no error messages when I tried to play the Output file in VLC.
Hope this suggestion works for someone else trying to fix an AVI with broken indexes.
It was just one made by some guy who's made a total of two posts here.
He was reencoding the file. That degrades quality.
It would be a last resort only.
Repairing the index with Avidemux, VirtualDub or or the other repair tools mentioned above are the "best" options.
Last edited by AlanHK; 11th Aug 2013 at 21:06.
Last edited by willhenderson; 11th Aug 2013 at 22:16.
MediaPlayer Classic is good for working out sync.
Play it and press the + and - keys to get it synced, note the amount and then use that in Avidemux.
But if the AVI is really damaged, sync may jump in different places and it may be very hard to resync.
Media Player Classic is Windows only. Is there a Mac alternative out there you know of in regards to determining audio sync? I searched google and theres a lot of angry people it's not available for OSX
VLC's Record function, and hey presto! VLC makes a NEW copy WITH a new index. So, let VLC rebuild the index, hover mouse over the record button, then hit it when file starts to play. Try it!!! Worked for me
I used the latest version of VLC to fix my broken AVI file.
When trying to play my file in VLC I got the popup message 'Broken or missing AVI Index'
I then close VLC down and then open up VLC again
Then go to the menu Media and select Convert/Save
Then either press Add and select the broken file or drag-and-drop the file
Then press convert/save
Then another box pops up - Convert
I changed the Profile default to 'Video for DivX compatible player'
Then press the browse button to select a destination and filename
Then give it a name in the Save file popup
Hit start from the next screen
I then get the popup message 'Broken or missing AVI Index'
I then pressed the 'Build index then play' button
VLC then rebuilds the index (this may take a while)
It then converts the file (this may take a long time)
Once finished close down VLC
The copy at the destination you previously gave is the converted file
An extremely fast method to fix this problem is via ffmpeg (http://www.ffmpeg.org/).
For example, to fix a bad avi file "bad.avi" to "good.avi", you'd do the following:
ffmpeg -i "bad.avi" -c:v copy -c:a copy "good.avi"The 2 arguments tell ffmpeg to directly copy the video and audio portions of the original file.
It takes roughly 10 seconds on my iMac to fix a 1GB AVI file.
This worked perfectly!!
Had a 3+ GB video to fix, it had a broken .avi index file. Had to read up on how to use the program, programming/coding doesn't come naturally to me, but the help and discussion forums were easy to understand. Program worked like a charm, took just over 8.5 minutes to convert, but now is perfect and able to be edited in WMM.
For the record, the "filename.avi" can be specified to the exact directory you have. That was where I was stuck, I had space in another drive, but not on my C:\WorkSpace drive.
Overall, 10/10 would recommend to other people having this problem.
ffmpeg can sometimes work OK, always worth a try.
Also suggest as habit, to load into VDUB with re-derive keyframe.
If all else fails, there is always the possibilty to recover using PotPlayer, video record option.
PotPlayer is quite resilient to some forms of corruption and can in many cases play clips
without any problems, that other players crash and burn with (VLC seems pretty awful as regards corruption resilience).
You have to switch off all image processing type stuff, crop deinterlace etc, and would suggest
setting everything to original, original size etc and something like "Do not change Aspect Ratio",
save somewhere as AVI with most successful recovery option being raw YV12 (but big files).
Set audio to raw PCM original everything eg channels. Lastly, make sure all of your audio settings
are about half way, then hit record. Do a couple of minutes test run to check out results.
Latest beta Potplayer seems to have a couple of problems, suggest latest non beta.
EDIT: Even if Potplayer fails at a particular place in video clip, it may be possible to jump over
corruption and retry, can use 'G' key (goto) to seek just past the problem.
Last edited by StainlessStephen; 11th Jun 2014 at 17:19.