“This AVI file is broken” or missing its index: how to rebuild it losslessly
Why VLC says an AVI file is broken and seeking fails, how to rebuild the idx1 index without re-encoding, and when the missing frames are gone.
By the Bytevive team8 min read

You open an older recording or screen capture in VLC and get: “This AVI file is broken. Seeking will not work correctly.” Or Windows Media Player refuses to open the clip, or plays it from the start while refusing to drag the progress bar.
Most of the time, the video frames are still sitting in the file. AVI writes its table of contents last, so any recording that stopped early, lost power, or finished an incomplete download loses that table first. Rebuilding it is lossless and takes seconds once you separate a missing index from a missing codec.
Why AVI files lose their index
Microsoft’s AVI RIFF specification lays out a standard AVI as three parts inside a RIFF container: a header list (hdrl) describing frame rate and streams, a media list (movi) holding interleaved video and audio chunks, and an index chunk (idx1) at the very end listing where every keyframe and audio block lives.
Inside a standard AVI (RIFF) file
Video and audio chunks arrive inside movi. The idx1 index is written last, so an interrupted save or download cuts it off first.
- RIFF + hdrlCodec & frame rate
- movi chunksInterleaved video & audio frames
- idx1 indexByte offset of every frame
Recording or download stops here: everything after about 78% of the file is missing, which takes out movi chunks, idx1 index.
Notice the silver lining compared with a cut-off MP4: every chunk inside movi carries its own stream identifier and byte length, and the codec parameters already sit at the front in hdrl. Unlike a camera MP4 that lost its moov atom (which needs a reference clip to recover codec settings), an AVI with an intact front header can almost always be indexed again from its own bytes.
Step 1: confirm what is actually wrong
| Symptom | Likely cause | Best fix |
|---|---|---|
| VLC warns “This AVI file is broken” and offers to build index | Missing or truncated idx1 index | Rebuild the index with Bytevive or FFmpeg -c copy |
| Plays from 0:00, but dragging the timeline jumps back or stalls | Missing index or broken keyframe flags | Rebuild the index losslessly |
| VLC plays cleanly with seeking, but Windows Media Player shows an error | Legacy codec inside AVI (DivX, Xvid, DV, MJPEG, AC-3) | Keep using VLC, or transcode to H.264 MP4 if you need native Windows playback |
| File is 0 KB, or ffprobe prints “Invalid data found when processing input” | Empty file, overwritten header, or another format renamed to .avi | Check the original card/source; container repair cannot rebuild a missing header |
If you want a quick read of the streams inside before repairing, open the file in MediaInfo or run ffprobe (ffprobe broken.avi). If it reports the video and audio codecs cleanly, the header survived and an index rebuild will usually save everything that reached disk.
Step 2: rebuild the AVI index in your browser (up to 512 MB)
Bytevive’s AVI, MKV & WMV Repair walks the RIFF chunks locally in your browser tab without uploading the video or re-encoding a single frame:
- Open AVI, MKV & WMV Repair and drop a copy of the AVI onto the page. Checking and repairing the structure run without an account.
- Bytevive scans every complete video and audio chunk, trims any half-written final chunk, and writes a fresh index at the end.
- Sign in with a free account to save the repaired copy, then open it in VLC to test playback and seeking. Most web browsers cannot play AVI natively, so Bytevive tells you plainly when it could not play a preview rather than guessing.
Step 3: rebuild a larger AVI with FFmpeg (lossless)
If your AVI is over 512 MB (such as an uncompressed capture or long DV transfer), use FFmpeg to copy the streams into a clean container without re-encoding:
ffmpeg -i broken.avi -c copy fixed.aviIf timestamps jump or audio drifts after a capture crash, ask FFmpeg to regenerate missing presentation timestamps while still copying the video and audio losslessly:
ffmpeg -fflags +genpts -i broken.avi -c copy fixed.aviNeed the repaired clip to open natively in Windows Photos, macOS QuickTime, or a browser without installing extra codecs? If the video inside is already H.264 and AAC, you can remux straight into MP4 with ffmpeg -i broken.avi -c copy -movflags +faststart fixed.mp4. Older codecs like DivX, Xvid, or DV-AVI will need a re-encode (for example, to H.264 MP4) if you want native playback outside VLC.
What an index rebuild cannot bring back
- Footage that never reached disk. If the recorder stopped at minute 12 of a 20-minute take, rebuilding the index makes the 12 recorded minutes seekable, but the last 8 minutes were never written.
- A wiped front header. If the opening
RIFFandhdrlbytes were overwritten with zeros, a container scan has no codec or resolution table to reference. - Damaged pixel blocks inside frames. Structural repair fixes seeking and duration; if individual frames smear or freeze, only re-encoding skips past the broken packets. See how to fix corrupted video files for the full troubleshooting order.
The bottom line
“This AVI file is broken” almost always means the idx1 table at the end was never written, not that your video is gone. Work on a copy, rebuild the index losslessly in AVI, MKV & WMV Repair (up to 512 MB, no upload) or with FFmpeg -c copy for larger recordings, and confirm seeking in VLC.
Frequently asked questions
What does VLC mean by “This AVI file is broken. Seeking will not work correctly”?
Does clicking “Build index then play” in VLC fix the AVI permanently?
Does rebuilding an AVI index reduce video quality?
Can Bytevive repair an AVI file with a missing index?
Why does my repaired AVI still show a black screen or no sound in Windows Media Player?
Sources
Every claim, error message, price, and limit cited above comes from these pages, checked on December 4, 2026. If one has changed, tell us at support@bytevive.com and we’ll update the article.


