Guides

Why won't this video play?

A video that will not open has usually failed for one of four reasons, and the file itself will tell you which.

Short answer

Read the container structure before you try to repair anything. An MP4 is a tree of boxes with declared sizes — if a size runs past the end of the file, or the index box is missing, that says exactly what went wrong and whether it is worth attempting.

Four reasons, and they need different answers

The file is incomplete. A transfer stopped, a card was pulled, a recording did not close properly. The bytes that are there are usually fine; what is missing is the end.

The index is missing or in the wrong place. An MP4 keeps a table telling the player where every frame lives. Cameras and recorders write it last, on stopping. Interrupt the recording and you get hours of perfectly good video data with nothing saying where anything is — and players will refuse to open it, which looks identical to total corruption and is not.

The codec is not installed. The container is fine, the player just cannot decode what is inside it. HEVC on Windows is the usual case.

The extension is a lie. The file is called .mp4 and is actually a MKV, or an HTML error page that got saved with a video’s name because a download failed.

The last two are easy and the first two look the same from the outside. Telling them apart is the whole job.

Look at the file before you repair it

An MP4, MOV or M4V is a tree of boxes. Each box declares its own length and type in its first eight bytes, and boxes nest. That structure is readable without decoding a single frame, and it answers the question directly:

  • A box whose declared size runs past the end of the file means the file is truncated — the recording was cut off. You know how much is missing.
  • No moov box at all means the index was never written. The video data is likely intact.
  • A moov that is present but sits after the mdat means the file is fine but not streamable, which is why it plays locally and fails over the web.
  • Boxes that make no sense at all means the bytes are genuinely damaged.

AVI works the same way with RIFF chunks instead of boxes.

Doing this first tells you whether repair is worth attempting, which saves you running four tools against a file that was never going to come back.

The easy checks, in order

  1. Try VLC. It carries its own decoders and is far more tolerant of a damaged container than the built-in players. A surprising number of “corrupt” files simply play.
  2. Check the real format. file video.mp4 on macOS or Linux. On Windows, open it in a hex viewer and look at the first sixteen bytes. If it starts with <!DOCTYPE html you downloaded an error page.
  3. Check the size against what it should be. A 4-minute 4K recording is not 12 MB. If the file is far too small the transfer stopped, and there is nothing in the missing part to recover.
  4. Re-copy it from the source if the source still exists. Far more videos are damaged in transfer than at recording, and this fixes those completely.

What repair can and cannot do

Repair, for a video, means one of two things.

Rebuilding an index is genuinely fixable, and often completely: the frames are there, and a reference recording from the same camera can supply the structure the interrupted file is missing.

Everything else is not repair, it is salvage. A file missing its last 30 seconds is missing them permanently — the bytes were never written. What a tool can do is make the first part playable, and that is worth having, but nobody is getting the end back.

Be sceptical of anything that promises to fix any video. The honest version of the offer is “make the intact part play”.

The programs for this

  • VideoMend reads the container and tells you what is wrong. inspect walks every box or chunk with its offset, size and type; diagnose runs structural playability checks and gives each a pass, warn or fail; tree prints the nesting. It handles MP4, MOV, M4V, 3GP and AVI, and it does it without a line of codec code — it never decodes a frame, so it never guesses.
  • MediaRescue does the same class of job for photographs: decodes every image in a folder and labels each healthy, truncated, corrupt, mislabelled, empty or unreadable.
  • PhotoRevive repairs the narrow case it can actually repair — JPEGs that lost their tail — and writes the results to a separate folder.
  • CardRecovery is for when the file is not there at all: it carves media out of a raw card image whose filesystem is gone. See recovering photos from a memory card.

Free while we are in preview, one file each, Windows and Mac.

Other guides

All guides · All 100 programs