NasrTech
Missing MP4 index

Moov atom not found: rebuild the index your recording never got

Your video won't open, and ffmpeg, or an app built on it, says moov atom not found. Your recording stopped before the camera wrote its index, and the frames it captured up to that moment still sit in the file with nothing pointing to them. The checker on this page rebuilds that index in your browser and shows you a free 5-second preview before you pay.

Free check and 5-second previewNothing uploadedOriginal quality

Repair your video

MP4 or MOV from a phone, action camera, drone or dashcam. Any size.

  1. Check
  2. Repair
  3. Preview
  4. Download

The moov atom is the file's index

An MP4 or MOV file is a chain of boxes, which Apple's QuickTime documentation calls atoms. Two of them hold your recording. The mdat box carries the compressed video and audio, packet after packet, with no markers between them. The moov box describes that data, track by track, in a sample table:

BoxWhat it records
stszthe size of every video frame and audio packet
stco or co64where each run of frames starts in the file
stts and cttshow long each frame lasts and the order to show frames in
stsswhich frames are keyframes
stsdthe codec setup: avcC for H.264, hvcC for H.265, esds for AAC

The avcC and hvcC entries hold the parameter sets (SPS and PPS, plus VPS for H.265) that a decoder must read before it can draw the first picture. Without moov, a player sees one long run of bytes with no frame boundaries, no clock and no decoder settings. ffmpeg reports that as moov atom not found.

The index takes little space. In a 6-second test clip we exported with ffmpeg, moov used 7,845 bytes of a 694,482-byte file.

Why the index goes missing

A camera can't write the index during the recording, because the index lists the size and position of frames that don't exist yet. It streams frames into mdat and writes moov at the end, when you press stop. Phones, action cameras, drones and dashcams record this way, and ffmpeg's MP4 output does the same with its default settings.

Cut the recording before that last step and the file ends with frames and no index:

  • the battery dies mid-recording
  • the camera app, the recording program or the computer crashes
  • someone pulls the memory card or unplugs the drive
  • a dashcam loses power when the engine stops

You get the same message for a file that never finished arriving: a copy that stopped halfway, or a recording you open while the camera is still writing it. If the original still exists, copy it again before you repair anything.

Confirm it before you repair

Run ffprobe, which comes with ffmpeg:

ffprobe broken.mp4

A file with frames and no index prints:

[mov,mp4,m4a,3gp,3g2,mj2 @ 000001e4338737c0] moov atom not found
broken.mp4: Invalid data found when processing input

ffmpeg -i broken.mp4 stops on the same line. VLC opens the file and ends playback at once, with nothing on screen.

The message alone doesn't prove your footage survived. We ran ffprobe on a 0-byte file and on a 5 MB file of zeros, both named .mp4. Both gave moov atom not found, with one extra warning first:

Format mov,mp4,m4a,3gp,3g2,mj2 detected only with low score of 1, misdetection possible!

That warning means ffmpeg found no MP4 structure and picked its MP4 reader from the file name alone. A 0-byte file, or one that triggers the warning, holds no footage, and no tool can rebuild it. A file whose size fits the length of the recording, with no warning, points to the case a repair can fix: frames on disk, no index.

Free tools: untrunc and recover_mp4

Two free programs rebuild a missing index. Both need a healthy reference video from the same camera, and both expect you to be at ease with technical tools.

untrunc is open source. You give it the working clip and the broken one:

untrunc working.mp4 broken.mp4

The anthwlock fork offers Windows builds with a basic graphical version; on Linux and macOS you install it and run it in a terminal. Its README warns that the chances are slim with a reference from a different camera.

recover_mp4 is a command-line tool that works in steps. recover_mp4 good.mp4 --analyze reads the healthy clip, a second run extracts the raw video and audio streams from the broken file, and you join them into a new MP4 with ffmpeg, typing the frame rate yourself. Its author no longer supports the downloadable version.

Rebuild the moov atom in your browser

The checker on this page runs the repair engine of the Video Repair apps for Android and Windows, compiled to WebAssembly. Your browser reads the video from your own disk, and the file never uploads.

  1. Drop the MP4, MOV, M4V or 3GP file into the tool above.
  2. The free check reads the footage and tells you whether it can rebuild the file. It works with H.264 or H.265 video and AAC sound.
  3. If your camera kept its settings only in the moov, the tool asks for a reference clip: any healthy video from the same camera at the same settings. That clip also brings the sound back when needed.
  4. Watch the free 5-second preview, at reduced quality with a watermark.
  5. Download the full video with a plan: one video, 3 months or a year, and you can cancel anytime. If the repaired video doesn't play, you get a refund.

The tool copies your camera's video and sound data byte for byte and writes a new moov around it. It re-encodes nothing. It can't rebuild a file that is empty or all zeros, bring back deleted or overwritten footage, open AVI, MKV, TS or WebM files, or decrypt videos hidden by a vault app.

Questions

Frequently asked questions

Can ffmpeg fix moov atom not found on its own?

No. ffmpeg needs the moov to read the file, so ffmpeg -i broken.mp4 -c copy fixed.mp4 fails with the same error. The -movflags +faststart option moves the moov of a healthy file to the front, and it can't create a missing one.

How do I keep ffmpeg recordings from losing the moov atom?

Record fragmented MP4 with -movflags frag_keyframe+empty_moov. ffmpeg then writes the codec setup at the start and indexes the video in small fragments as it records. We cut a 6-second fragmented test file in half, and ffprobe still opened the first 3 seconds.

Why does the tool ask for a second video?

Some cameras store the video settings only in the moov, next to the AAC sound settings. A healthy clip from the same camera at the same settings carries the same values, and the tool reads them from it.

Will the repaired video lose quality?

No. The repair re-encodes nothing. The new file holds the bytes your camera recorded, with a new index written around them.

Does my video get uploaded?

No. The engine runs inside your browser as WebAssembly and reads the file from your disk. The video never leaves your device.