By Lucas, founder of FixMyVideos · Updated
"moov atom not found": what is missing from your MP4 or MOV, and how to get the footage back
ffmpeg prints moov atom not found, QuickTime will not open the file, and Finder lists a 3 GB clip as 0:00 long. Those are one problem seen from several programs: the file has lost its index. When the recording was interrupted rather than erased, the pictures are still in the file. Whether they can be pulled back out depends on what else went missing, and the first half of this page is about telling those cases apart before you spend anything.
What the moov atom is, and why it goes missing
An MP4 or MOV file is a chain of boxes, which the format calls atoms. Two of them matter here. The mdat box holds the coded pictures and audio frames packed back to back, with no labels between them. The moov box is the index: which codec was used, the decoder configuration (the SPS and PPS parameter sets for H.264, plus a VPS for HEVC), where every picture starts, how long it is, when it should play, and how long the whole recording runs. A player reads moov first. Without it, mdat is a few gigabytes nobody can interpret.
Most cameras write moov last, when you press stop, because the sizes and offsets it lists are only known once recording ends. If the power goes before that (a flat battery, a card pulled mid-take, a phone app that crashes, a drone that loses power on impact), the index never reaches the card. What is left looks like this:
[ftyp] a few dozen bytes saying "this is an MP4"
[mdat] every picture and audio frame up to the moment power went
...and no moov anywhere
Some phones reserve space for the index at the front of the file instead, and fill it in at stop. Interrupt them and that block can still hold an index from an earlier clip (more below). The .3gp files of older phones break the same way, with older codecs inside; repairing a 3GP has its own page.
Why the duration shows 0:00
The duration is a field inside moov. With no moov, players and Finder show 0:00 or no duration at all, while ffprobe and ffmpeg refuse the file with the moov atom not found error and Premiere fails the import. A 0:00 or N/A duration also appears on files with no damage at all. A fragmented MP4 (common with screen recorders, downloaded streams, and anything written with -movflags frag_keyframe) keeps an almost empty index at the front on purpose and stores its timing in hundreds of small moof boxes further on. Strict tools report no duration. One file that reached us as a zero-duration problem was a 256 MB fragmented MP4, 990 seconds of 1080p60 with AAC stereo, that decoded end to end without a single error. A remux would have fixed it, but our engine first carved it as if it were damaged and lost most of the frames and all the audio; it now recognises fragmented files and remuxes them.
Check what you actually have
Run this first:
ffprobe -v error -show_format -show_streams yourfile.mp4
If it lists streams and a real duration, the index is readable and your problem lies elsewhere (see invalid data found when processing input or QuickTime error -2048). If it lists streams but the duration is 0 or N/A, try a remux, which rewrites the index from the timing the file already carries:
ffmpeg -i yourfile.mp4 -c copy -movflags +faststart fixed.mp4
If it stops at moov atom not found, look at the bytes. On macOS or Linux, hexdump -C yourfile.mp4 | head -20; on Windows, any hex viewer such as HxD. A real recording shows ftyp in the first line and then dense, random-looking data. hexdump prints a lone * when lines repeat, so if almost the whole file collapses into one line and a *, you are looking at filler rather than video. Do the same at the end with tail.
Then ask where the file came from. If it is a copy (off a card, a phone, a cloud folder, a download) and the original still exists, copy it again, ideally through a different reader or cable. We have had a 2.84 GB screen recording whose last 1.47 GB, 52 % of the file, was nothing but zeros, while the file's own header declared media running almost to the end. If that file is a copy, the copy may simply not have finished, and the original may hold the whole recording with its index intact.
If you have another clip from the same camera, shot with the same resolution, frame rate and codec, the free tool untrunc can borrow that clip's index as a template. With a good reference it works well, and all it asks of you is a terminal.
What our engine does with a file that has no moov
Finding the pictures
In MP4, H.264 and HEVC pictures are stored as NAL units, each preceded by its own length. The engine walks the mdat from one length to the next. Audio interleaved between pictures breaks that chain every frame or two, so the walker has to find the next real picture by checking that a candidate's slice header parses and that it chains onward.
We check this against a known original. We take a healthy recording, cut it at 250 MB so it produces the same moov atom not found, run the full pipeline and compare every picture with the original. On a DJI Osmo Pocket 3 clip that gives 722 of 722 pictures back byte for byte, with the audio aligned to 0.0 ms by cross-correlation. The same test is how we caught an earlier version of the walker silently skipping 216 of those 722 pictures. ffmpeg concealed the missing pictures without printing an error, so a clean decode could not show the loss; only the comparison with the healthy original counted it. The result looked washed out and green (a mismatched camera profile was partly to blame for the tint), and QuickTime refused it.
Rebuilding the decoder configuration
Pictures alone do not decode. The decoder needs the parameter sets, and some recorders only ever write them into the moov that never arrived; Android's recorder is one. The engine first looks for copies inside the bitstream, then tries stored camera profiles and keeps one only if it decodes the carve cleanly. For H.264 it can also derive the parameter sets from the stream itself: the slice headers reveal the field widths, and the decoder's own errors reveal the picture size. A derived set is accepted only if windows at the start, middle and end of the recording decode with ffmpeg completely silent. On a 3.35 GB Windows screen recording with no parameter sets anywhere in the file, that recovered 146,306 pictures at 1530×854, checked by eye at 1, 60 and 80 minutes.
That derivation covers H.264 only, in 8-bit 4:2:0, and it fails on streams that use B-frames. A 55 MB Android phone clip showed where the stored profiles fell short: no parameter sets in the file, and none of the 78 profiles we had then would decode it. We added 30 Android phone profiles taken from healthy recordings, three of them now decode that clip, and all 778 of its carved pictures come back clean at 1920x1080. When nothing in the file or the store gives up the decoder configuration, we still ask for a short clip from the same phone or camera at the same settings, and the diagnosis says so.
Timing and the delivered file
The frame rate comes from the evidence in the file, mostly the audio running alongside the pictures. On the 3.35 GB screen recording the audio stopped after 178 seconds of 81 minutes, and dividing the frame count by 178 seconds gave 820 fps, so the engine now divides by the span the audio actually covers. On the H.264 and HEVC path the coded pictures are copied into the new file without re-encoding, HEVC is tagged so QuickTime will open it, and files over 4 GB get 64-bit offsets. Sorenson Video 3, an old QuickTime codec current players no longer decode, is transcoded to H.264 instead.
Damage that looks like a missing moov but is not
Sometimes the index is there and players still cannot reach it. An 11 MB file had lost its first 512 bytes. Its index was intact at the end of the file, but every player stopped at the unreadable first box and never reached it. The engine now finds the moov by searching for it, works out how far the data has shifted, writes the header back and puts every surviving byte at its original offset. All 2,009 frames decoded.
In another case the index was present but described the wrong recording. Three iPhone HEVC recordings from a card recovery each had a perfectly valid moov that described the previous clip, left in the reserved header block. Against a ground-truth copy, one of them now comes back 610 of 610 pictures byte-identical, with the audio identical too.
A file can also end in filler instead of video. Besides the zero-filled screen recording above, we had a 1.31 GB file whose last 60 % was a single 512-byte sector repeated over and over. We delivered every picture that existed, 8 minutes 29 seconds of it. If the file was copied from somewhere, the source may hold more. If the recorder reserved the space up front and then died, it will not.
When there is nothing to recover
Some files contain no recording, a 0-byte file being the obvious one, and we say that in the diagnosis rather than offering a repair:
- Every byte is zero. A 30 MB upload was
0x00from start to finish. No tool can get video out of that. - Only the header survived. A 24-byte upload held one
ftypbox and nothing else. It came out of a card-recovery run that found the start of a recording and never reached the rest; a copy that stopped after its first bytes leaves the same shape. If recovery software produced the file, look through the other files from that same run, since the footage tends to be in one of the much larger ones, and stop saving anything new to the card or drive. - One sector repeated. A 20 MB dashcam file turned out to contain 24 distinct 512-byte sectors, 12,288 bytes of real data in total, repeated to fill the space: every read had handed back a block it had already returned. Copy the file again through different hardware.
Trying it on your file
Upload the file (up to 150 GB). Analysis and a free 5-second preview usually take a few minutes, longer for very large files. Check that the preview really shows your footage. If it does, the full file costs €6 under 2 GB, €18 from 2 to 20 GB, €35 from 20 to 50 GB and €59 above that, VAT included. If it does not, you pay nothing. Uploads are deleted automatically after 48 hours.
FAQ
Can "moov atom not found" be fixed without a reference file? Yes, when the pictures and the decoder configuration can be found or derived from the file itself. The engine carves the pictures, finds or derives the decoder configuration and writes a new index. When it needs a clip from the same camera, the diagnosis says so.
Why does my video show 0:00 when the file is several gigabytes? The duration is stored inside the index. If the index was never written, there is nothing to read. If the file is fragmented, the index at the front is nearly empty by design, and a remux with ffmpeg usually restores the duration.
Will the repaired file keep its original quality? For H.264 and HEVC recordings the coded pictures are copied without re-encoding, so the picture is what the camera recorded. Audio is copied when it is AAC and re-encoded otherwise. Sorenson Video 3 is transcoded to H.264 because current players cannot decode it.
The last minutes of my recording are missing. Can you get them back? Only if those bytes are in the file you upload. If the end of the file is zeros or a repeating pattern, the copy may have stopped early, and the original card, phone or cloud folder is where the rest might be.
How is this different from untrunc? untrunc rebuilds the index from a healthy reference clip you supply, so try it first if you have one. Our engine starts from the broken file alone and only asks for a reference when it cannot find or derive the decoder configuration.
How long do you keep my file? Uploads are deleted automatically after 48 hours. Details are in the privacy policy.
Related
- QuickTime error -2048 / the document could not be opened
- Invalid data found when processing input
- Premiere import failed
- GoPro HERO12 truncated file
- DJI Mavic 3 corrupted MP4
- Recover an MP4 file
- FixMyVideos vs untrunc
- How our recovery engine works
Free preview · No commitment
Ready to recover your video?
Upload your file and get a free 5-second preview in about a minute. Pay only if the preview looks right.
Upload your file →