Skip to content
Bytevive

“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

A laptop showing VLC's broken AVI index dialog next to an old camcorder tape box and USB drive

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.

  1. RIFF + hdrlCodec & frame rate
  2. movi chunksInterleaved video & audio frames
  3. idx1 indexByte offset of every frame
First byteRecording or download stops hereLast byte

Recording or download stops here: everything after about 78% of the file is missing, which takes out movi chunks, idx1 index.

Not to scale. Because each chunk inside movi starts with its own 4-character ID and byte size, a repair tool can scan movi and regenerate idx1.

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

SymptomLikely causeBest fix
VLC warns “This AVI file is broken” and offers to build indexMissing or truncated idx1 indexRebuild the index with Bytevive or FFmpeg -c copy
Plays from 0:00, but dragging the timeline jumps back or stallsMissing index or broken keyframe flagsRebuild the index losslessly
VLC plays cleanly with seeking, but Windows Media Player shows an errorLegacy 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 .aviCheck 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:

  1. Open AVI, MKV & WMV Repair and drop a copy of the AVI onto the page. Checking and repairing the structure run without an account.
  2. Bytevive scans every complete video and audio chunk, trims any half-written final chunk, and writes a fresh index at the end.
  3. 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.avi

If 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.avi

Need 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 RIFF and hdrl bytes 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”?
An AVI container stores its frame index (the idx1 chunk) at the very end of the file. When a recording, capture, or download stops early, the video and audio chunks are still inside the movi list, but the index at the tail is missing or incomplete. VLC warns you because it cannot jump to a timestamp without scanning the chunks first.
Does clicking “Build index then play” in VLC fix the AVI permanently?
No. VideoLAN's AVI module documentation notes that VLC builds the index in memory for the current session only. The file on disk is untouched, so every other player will still fail until you write a new copy with a real index.
Does rebuilding an AVI index reduce video quality?
No. Rebuilding the index walks the existing video and audio chunks and writes a new table of byte offsets at the end of the file. Not a single video frame or audio sample is re-encoded.
Can Bytevive repair an AVI file with a missing index?
Yes, for AVI files up to 512 MB. Bytevive's AVI, MKV & WMV Repair rebuilds the missing index from the chunks in your browser with nothing uploaded. Checking needs no account; saving the repaired copy requires a free account. Most browsers cannot preview AVI video directly, so open the saved copy in VLC to confirm playback.
Why does my repaired AVI still show a black screen or no sound in Windows Media Player?
AVI is only a container. Older AVI files often carry DivX, Xvid, DV, MJPEG, or AC-3 streams whose codecs are not included in modern Windows Media Player. If VLC plays the repaired copy cleanly, the container is fixed and the remaining issue is codec support in that 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.

  1. Microsoft Learn: AVI RIFF File Reference
  2. Library of Congress: AVI (Audio Video Interleaved) File Format
  3. VideoLAN wiki: AVI module options (avi-index)
  4. VideoLAN: VLC media player
  5. FFmpeg Formats Documentation
  6. FFmpeg: ffprobe documentation
  7. MediaArea: MediaInfo

AVI or MKV stops early? Fix the structure in your browser.

Check and preview free for AVI, MKV, WebM, FLV, TS, and WMV files up to 512 MB; free account to save. Nothing is re-encoded or uploaded.

Repair a video file, free

Other free tools: video, PDF, photo, Office, ZIP, and audio repair.