Grey blocks. Smearing. A frozen frame while the sound plays on. You are looking at corrupted data inside your AVI file. These avi video glitches happen when parts of the video stream are damaged or missing. The way the video was compressed determines how far the damage spreads and what you can do to fix it.
How AVI Video Compression Causes Glitches
Most AVI codecs, including Xvid, DivX, and H.264, do not store every frame as a complete image. They use a mix of keyframes (full pictures) and in-between frames that store only the changes from the previous frame. This saves space but creates a chain. Each in-between frame depends on the one before it. If a keyframe is damaged, every frame that follows it will be affected until the next keyframe arrives. That is why you see avi grey blocks or avi smearing pixels that persist for several seconds.
Why Damage Spreads Until the Next Keyframe
When a keyframe is corrupted, the decoder cannot reconstruct the full picture. The in-between frames that follow try to apply changes to an already broken image. The visual errors grow or smear. The picture may freeze, turn grey, or show pixelated blocks. The audio, stored separately, often continues playing normally. This is why avi frozen picture sound continues is a common complaint. The damage stops only when the decoder reaches the next clean keyframe and starts fresh.
Codecs That Do Not Spread Damage
Not all AVI files behave the same way. Motion JPEG and DV codecs store every frame independently. Each frame is a complete picture. Damage to one frame does not affect the next. If you see a single frame with corrupted avi frames and the rest of the video plays fine, the file uses one of these intra-frame codecs. The repair approach for these files is simpler because the damage is isolated.
Diagnosing the Problem
Spot Damage With a Player
Before you decide how to fix the file, you need to know whether the damage is in the index, the keyframes, or the in-between frames. Play the file in VLC using the "Play as is" option. This forces VLC to decode the stream without trying to fix errors. Smearing where frames are missing confirms the decoder is skipping damaged data.
Pinpoint Errors With ffmpeg
Run a command line check with ffmpeg. Use ffmpeg -v error -i input.avi -f null -. This lists the timestamps of every decoding error. Look for patterns. Errors clustered around one time range point to a damaged keyframe.
Remux Vs. Re-encode What Each Can Do
Remuxing
Remuxing copies the video and audio streams into a new container without recompressing the video. This fixes problems with the file structure, such as a broken index. A rebuilt index fixes seeking and duration. It does not repair damaged frame data. If the visual glitches come from corrupted keyframes or in-between frames, remuxing will not remove them. The smearing and grey blocks remain.
Re-encoding
Re-encoding decodes the entire video stream and then compresses it again. This process can remove visual damage because the decoder skips or interpolates the bad frames. Re-encoding takes more time and reduces quality slightly. The video is compressed again. For files with many avi pixelated sections or keyframe corruption, re-encoding is the only way to get a clean result.
How to Remux or Re-encode Your AVI File
The steps below assume you have ffmpeg installed. Adjust the filenames to match your file.
- Remux (rebuild index): Run
ffmpeg -i input.avi -c copy output.avi. The-c copyflag copies the streams without re-encoding. This fixes seeking and duration but leaves visual glitches. - Re-encode (fix frame damage): Run
ffmpeg -i input.avi -c:v libxvid -q:v 5 -c:a copy output.avi. Replacelibxvidwith your preferred codec.-q:v 5sets quality (lower is better). This decodes the damaged frames and re-encodes them, removing grey blocks and smearing. - Check the result: Play the new file. Glitches gone means the re-encode worked. If they remain, the source file may have more severe damage that requires manual frame editing.
When to Use an Online Repair Tool
If you do not want to install software or run command lines, upload your file to a service like avi.repair. The site recovers corrupted AVI files online for free with no watermark. It can rebuild the index and attempt to re-encode damaged sections. A straightforward upload-and-download workflow for users who want a simpler path.