Skip to content
Bytevive

How to fix corrupted video files: find the problem first, then the right fix

Two quick tests tell you why a video won't play. Then fix it: move the index, remux, rebuild a missing index, or re-encode, with free tools and no uploads.

By the Bytevive team9 min read

A laptop showing a video player error next to a camera, memory card, and card reader

“Corrupted video” covers half a dozen different failures. A clip from a camera whose battery died, an MP4 that only plays after it has fully downloaded, a phone video Windows refuses, and a file with green blocks halfway through all get the same label, but each needs a different fix, and the wrong one wastes hours.

So this guide starts with two tests that tell you which failure you have, then gives the fix for each, from the quick lossless ones to the last resorts. Where a problem has its own detailed guide, it’s linked.

First: copy it, and check where it came from

Make a copy and work on the copy. Then compare the file’s size with a similar clip of the same length. A file that is much smaller than it should be, or 0 KB, was cut off during a copy, download, or upload. If the original is still on the memory card, phone, or cloud, copy it again from there. That fixes more “corrupted” videos than any repair tool.

Two tests that tell you what’s wrong

Test 1: play it in VLC. VLC brings its own decoders and tolerates damage that other players reject. If it plays the file all the way through, the video data is intact.

Test 2: ask a file reader what it sees. Open the file in MediaInfo, or run ffprobe (ffprobe broken.mp4). A normal result lists the video codec (H.264 or HEVC), resolution, and duration. “moov atom not found” means the index is missing. A duration of a few seconds for a long recording means the index only covers part of it.

What's inside an MP4 or MOV file

The frames and the index are stored separately. Most video corruption is a problem with the index, not the frames.

  1. ftypFile type
  2. mdatThe video and audio frames
  3. moovIndex: codec, timing, where each frame is
First byteLast byte
Not to scale. Cameras write the index last, when recording stops; fast-start files have it before the frames instead.

Match the symptom to the fix

What you seeWhat’s wrongFix
Won’t open anywhere, even VLC; “moov atom not found”The index was never written (battery died, card full, app crashed)Rebuild the index; see video won’t play after the battery died
Plays only after downloading fully; stalls in a browser; can’t seekThe index is at the end of the fileMove the index to the front; see fast start explained
Error 0xc00d36c4 or “can’t play”, but VLC plays itA missing codec, usually HEVCFix the codec, not the file
Wrong duration, jumps, or sound out of syncBad or missing timestampsRemux with new timestamps
Green or gray blocks, freezes partway throughDamaged frames in the media dataRe-encode what’s readable
AVI won’t seek, or VLC says the index is brokenDamaged AVI indexVLC’s AVI repair

Phone and Mac videos that won’t play on Windows, or that QuickTime refuses, are usually codec problems too; see iPhone videos on Windows and QuickTime’s “not compatible” message.

Fix 1: Move the index to the front

Many cameras and apps write the index last, after the frames. Desktop players cope, but browsers, TVs, and upload sites often need the whole file before they can start, so the video looks broken. Moving the index to the front, called fast start, fixes it without changing a single frame.

  1. Open Bytevive’s Video Repair. You can check the file and preview the result without an account; saving the repaired copy requires a free account.
  2. Drop in the MP4, MOV, or M4V. Your browser does the work; nothing is uploaded.
  3. Save the new copy. If the index is already at the front, Bytevive says the file doesn’t need this repair. If the index survived but the video stopped early, it keeps every complete frame that reached disk. If the index was never written at all, it tells you that instead of changing anything.

With FFmpeg, the same result is ffmpeg -i in.mp4 -c copy -movflags +faststart out.mp4.

Fix 2: Remux the file

Remuxing copies the frames into a fresh container and writes a new index from them. It’s lossless and quick, and it fixes many files that play in VLC but nowhere else, or that show the wrong duration:

  • Basic: ffmpeg -i broken.mp4 -c copy fixed.mp4
  • Skip packets flagged as corrupt: ffmpeg -fflags +discardcorrupt -i broken.mp4 -c copy fixed.mp4
  • Rebuild timestamps for jumps and sync problems: ffmpeg -fflags +genpts -i broken.mp4 -c copy fixed.mp4

These options are described in FFmpeg’s format documentation. Remuxing can’t help when the index is missing entirely; FFmpeg will just repeat “moov atom not found.”

Fix 3: Rebuild a missing index

When recording stops suddenly, the frames are on the card but the index never gets written. Two things can bring it back:

  • The camera itself. GoPro’s HERO7 White manual says the camera automatically tries to fix files damaged by a power loss. Put the card back in the camera that recorded it and switch it on before trying anything else. Some dashcams and drones do the same.
  • A reference-based rebuild. untrunc reads the layout of a healthy clip recorded on the same device with the same settings and uses it to rebuild the broken one’s index: untrunc healthy.mp4 broken.mp4. Paid desktop tools work the same way.

Bytevive can tell you the index is missing, but can’t rebuild it yet. Our battery guide walks through the rebuild step by step.

Fix 4: Re-encode what’s readable

When frames themselves are damaged, re-encoding decodes everything that can still be decoded and writes a new, clean file. The damaged stretches show up as smears or a frozen picture, but the rest plays normally. Use HandBrake (free) with a default preset, or FFmpeg:

ffmpeg -err_detect ignore_err -i broken.mp4 -c:v libx264 -crf 18 -c:a aac fixed.mp4

Re-encoding loses a little quality and takes time, so keep it for files the lossless fixes couldn’t save.

Fix 5: AVI, MKV, WebM, FLV, TS, and WMV files

AVI files keep their index at the end, and MKV or WebM screen recordings stop mid-cluster when a recorder crashes. For files up to 512 MB, Bytevive’s AVI, MKV & WMV Repair rebuilds a missing AVI index from the chunks in the file, closes a cut-off MKV or WebM recording, and trims broken FLV, MPEG-TS, or WMV endings in your browser without re-encoding or uploading (checking needs no account; saving needs a free one). For an AVI that only needs temporary playback in VLC, you can also set Damaged or incomplete AVI file to Always fix under Tools → Preferences → Input / Codecs, an option described in the VideoLAN wiki, or remux a copy with FFmpeg as in Fix 2.

When a video can’t be fixed

  • The data isn’t there. A 0 KB file, or one filled with zeros, has no frames to recover. Find the original instead.
  • The last moments before a power cut. Frames the camera hadn’t written to the card yet are gone, whatever the tool.
  • No matching reference clip. If the camera is gone and no healthy clip with the same settings exists, reference-based rebuilds rarely work.

For a comparison of free online repair tools, including what each one actually does, see our test of free video repair tools.

How to avoid it next time

  • Stop recording before switching off, and keep batteries charged for long takes.
  • Use a fast, genuine memory card with free space, and format it in the camera.
  • Copy footage to a computer and check it before deleting it from the card.
  • Let copies and uploads finish before ejecting a drive or closing a laptop.

The bottom line

Copy the file, recopy it from the source if you can, and test it in VLC. If it plays there, the fix is a codec or a lossless remux. If it stalls in browsers, move the index to the front, free and without uploading. If it won’t open anywhere and the recording was cut off, the index needs rebuilding from the camera or a reference clip. Re-encode only when the frames themselves are damaged.

Frequently asked questions

How do I know if my video file is really corrupted?
Open it in VLC. If VLC plays it from start to finish, the video data is fine and your usual player is missing a codec or can't handle the file's layout. If VLC can't play it either, check the file size against similar clips: a file that is far too small was cut off or copied incompletely.
What does “moov atom not found” mean?
An MP4 or MOV file keeps its index, called the moov box, separately from the video frames. The recorder writes the index when recording stops, so if the battery died or the app crashed, the frames are there but the index isn't. Players can't decode the frames without it. The camera's own repair or a reference-based tool such as untrunc can rebuild it.
Can VLC fix a corrupted MP4?
Not really. VLC's repair option is for AVI files with a broken index. For MP4, VLC is most useful as a test: if it plays the file, a lossless remux will usually give you a clean copy.
Will repairing a video reduce its quality?
Remuxing and moving the index don't touch the video frames, so quality stays exactly the same. Only re-encoding, for example with HandBrake, produces new frames and loses some quality. Use it last.
Can Bytevive repair any corrupted video?
No. Bytevive's free Video Repair works on MP4, MOV, and M4V files in your browser with nothing uploaded: it moves a misplaced index to the front, and when a recording was cut off after its index was written, it keeps the frames that reached disk. It cannot rebuild an index that was never written. For AVI, MKV, WebM, FLV, MPEG-TS, and WMV files up to 512 MB, Bytevive has a separate AVI, MKV & WMV Repair tool that rebuilds missing AVI indexes and closes cut-off recordings.

Sources

Every claim, error message, price, and limit cited above comes from these pages, checked on November 29, 2026. If one has changed, tell us at support@bytevive.com and we’ll update the article.

  1. FFmpeg Formats Documentation: format options (err_detect, genpts) and the MOV/MP4 muxer (faststart)
  2. FFmpeg: ffprobe documentation
  3. untrunc (anthwlock fork) on GitHub
  4. GoPro HERO7 White user manual: File Repair (copy hosted by projectgo.pro)
  5. VideoLAN wiki: AVI module options (avi-index)
  6. VideoLAN: VLC media player
  7. MediaArea: MediaInfo
  8. HandBrake, the open-source video transcoder
  9. Microsoft Support: Codecs FAQ

Video stuck loading? Fix it in your browser.

Free account, no watermark. Moves a misplaced index to the front for MP4, MOV, and M4V, and your video is never uploaded.

Repair a video, free

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