How to fix a corrupted video

Most corrupted MP4 and MOV videos still hold their footage; what's missing is the index a camera writes when you press stop. First rule out the player and re-copy the file. If VLC or ffmpeg can't open it, the index must be rebuilt from a working clip filmed on the same camera.

Updated · 8 min read

First, check it’s really broken

Before repairing anything, rule out the simple causes. A surprising number of “corrupted” videos are fine, and the ones that aren’t usually fail in a way that tells you what’s wrong.

  1. Open it in a different player. On a Mac, try QuickTime Player and then VLC. If VLC plays it, the file is readable; your usual player just doesn’t support it.
  2. Copy it from the card again. If the video came off a memory card, a copy that was interrupted looks exactly like a corrupted file. Copy the original once more and try that.
  3. Check the file size. A 0 KB file has nothing in it. A file of several gigabytes that won’t open almost always still holds the footage.
Don’t film anything new on the card or phone the video came from until you’ve got it back. New recordings can overwrite what’s left.

This is what a video with a missing index looks like on a current Mac. QuickTime refuses it outright:

QuickTime Player dialog: The document h264-mp4-30-broken.mp4 could not be opened. The file isn't compatible with QuickTime Player.
QuickTime Player on macOS 27.0.1, opening h264-mp4-30-broken.mp4, one of our test recordings, made on a Mac and cut off before the index was written. The message blames compatibility, but the real problem is the missing index.

VLC is quieter about it. It adds the file to its playlist with a duration of 00:00 and plays nothing:

VLC media player playlist showing h264-mp4-30-broken.mp4 with a duration of 00:00
VLC 3.0.20 on macOS 27.0.1 with the same file. A duration of 00:00 on a file that's megabytes or gigabytes in size is the clearest sign the index is missing.

What “corrupted” usually means

An MP4 or MOV file has two parts: the footage itself, and an index that tells a player where every frame is, how long it lasts and which sound goes with it. Cameras, phones and drones write the index last, when you press stop. If recording ends any other way, the footage is saved but the index never is.

That’s why a 4 GB video can refuse to open. Nothing is wrong with the picture; the player just has no map to read it with. Technical tools call the index the moov atom, which is why you’ll see “moov atom not found” in error messages.

There’s a second, less common pattern. When a copy from a memory card is cut off, the index (which some cameras write at the start of the file) arrives intact, but part of the footage never does. The file looks broken because its index points at frames that aren’t there.

Which of these happened to you?

Most broken videos come from one of three situations. Each has its own guide:

Free fixes to try first

Try playing it in VLC

VLC plays many slightly damaged files that other players refuse. If it plays yours, save a clean copy with File › Convert / Stream: drop the file in, pick a profile such as “Video – H.264 + MP3 (MP4)”, choose Save as File and save it under a new name.

In our tests on macOS 27.0.1, VLC 3.0.20 rescued an interrupted copy of a Canon clip this way and wrote a 6.5-second file that plays. On files with a missing index it couldn’t do anything: the duration stays at 00:00 and the converted file comes out empty. If VLC won’t play your file, the index is probably missing, not just damaged.

Copy the streams into a fresh file with ffmpeg

If the index is only partly damaged, re-wrapping the video into a new file can fix it. This doesn’t touch your original:

ffmpeg -i broken.mp4 -c copy fixed.mp4

-c copy means ffmpeg copies the picture and sound as they are, without re-encoding, so it’s fast and loses no quality. On our interrupted Canon copy, ffmpeg 6.1.1 warned about a “corrupt input packet” at the very end and wrote a 6.7-second file that plays.

If ffmpeg stops like this, the index is missing completely and re-wrapping won’t help:

[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7a77068000] moov atom not found
[in#0 @ 0x7a76c50000] Error opening input: Invalid data found when processing input
Error opening input file h264-mp4-30-broken.mp4.

That’s the exact output from ffmpeg 6.1.1 on h264-mp4-30-broken.mp4, one of our test files: a 20 MB recording made on a Mac and stopped before the index was written.

When free fixes don’t work

A missing index has to be rebuilt from the footage. To do that, a tool has to find where each frame starts and ends in a long run of raw data, and it needs to know exactly how your camera saves video: the codec settings, the frame rate, how the sound is interleaved with the picture. None of that is in the broken file. It is in any other clip filmed on the same camera in the same mode, which is why repair tools ask for a working “reference” or “helper” video.

VideoRescue does this on your Mac

Drop the video, and it finds a helper clip from the same camera by itself. Watch a 10-second preview for free, then save the whole video for $9 once.

A repaired video playing in VideoRescue

Here’s what that looks like on the same 20 MB test file that QuickTime, VLC and ffmpeg all refused. VideoRescue found all 19 seconds and suggested the helper clip sitting next to it:

VideoRescue showing 19 s of video found in h264-mp4-30-broken.mp4, with a similar video suggested as the helper
VideoRescue on macOS 27 with the broken test file. The helper is a normal clip recorded with the same settings.

What can’t be fixed

Repair rebuilds what’s in the file; it can’t invent footage that was never written. Our numbers, from testing the VideoRescue engine on 12 broken files: 11 recordings made on a Mac and cut off so the index was missing, and 1 real Canon clip whose copy was cut short. Between them they cover H.264 and HEVC video, AAC and uncompressed audio, MP4 and MOV.

  • In our tests, when the footage was in the file, it could be rebuilt.
  • A cut-off copy only gives back what was copied. From an interrupted copy of a real Canon clip, about 6 seconds came back. The rest was never in the file, and no tool can get it from there.
  • What comes back is exact. On files we cut short on purpose, every recovered frame was identical to the original, frame for frame, up to the cut.
  • Size isn’t the problem. A 1 GB file was repaired without being loaded into memory, in under a second from the Mac’s own drive in our test; from a memory card it takes longer.
VideoRescue showing the part of an interrupted Canon copy that can be saved
The interrupted Canon copy in VideoRescue on macOS 27: 6 seconds can be saved. It reports only what's actually in the file.

And if the file is empty inside, there’s nothing to rebuild. Some cameras reserve space for a recording and never write it, leaving a file full of zeros. An honest tool will tell you so before you pay:

VideoRescue explaining that a file contains no video data to rebuild
A 52.4 MB test file made only of zeros, in VideoRescue on macOS 27. It says there's nothing to rebuild instead of offering a repair.

Questions

Is it safe to use an online repair site?

It works for some files, but you upload your video to someone else's server, and many sites cap the file size or charge to download the result. For private or long videos, a tool that runs on your own computer is the safer choice.

My video is on my iPhone. What do I do?

AirDrop it or copy it to your Mac first, then follow the steps above. Work on the copy, not the only version you have.

Will repairing the video make it worse?

Not if the tool writes a new file. VLC, ffmpeg and VideoRescue all leave the original alone. Keep the original until you're happy with the repaired copy.

Can a corrupted video be fixed for free?

Sometimes. If the file only needs re-wrapping, VLC or ffmpeg will do it for free. If the index is missing completely, free tools can't rebuild it, because they need to know how your camera wrote the footage.