FFmpeg throws moov atom not found followed by Invalid data found when processing input because the file has no index. The moov atom stores the track list, timing, and a table of where every frame sits inside the mdat (media data) atom. Without it, players and editors cannot read the video. Here is what triggers the error, how to confirm the index is missing, and which situations you can recover.
What the Error Means
The moov atom is the index of a MOV or MP4 file. It stores the location of every frame and the timing information. When FFmpeg says moov atom not found, the program scanned the file and cannot locate this index. Cameras and phones write the moov atom last, when recording stops. If the recording stops abruptly (battery dies, crash, full memory card), the video data may be present but the moov atom is missing. The same error appears for MP4, M4A, and 3GP files, which share the same atom structure.
How to Confirm the File Lacks Its Index
Before attempting any fix, verify the file truly has no moov atom. Use FFmpeg with the -v error flag to see only error messages:
- Open a terminal or command prompt.
- Run
ffmpeg -v error -i yourfile.mp4 -f null - - If the output contains moov atom not found, the index is missing.
Also check the file size. A file of 0 bytes or only a few kilobytes contains no recoverable video. If the file is several megabytes or gigabytes, the video data is still there.
Recoverable and Unrecoverable Situations
When Recovery Is Possible
If the file is large enough to hold video data (tens of megabytes or more) and the recording was interrupted near the end, the raw frames remain inside the mdat atom. Rebuild the moov atom to restore the file without re-encoding. Original quality is preserved.
When Recovery Is Not Possible
If the file is very small (a few kilobytes or less), it contains only headers or nothing usable. If the file was overwritten or the storage card was reformatted, the underlying data is gone. No tool recreates video that was never written.
Using a Reference Clip to Rebuild the Index
Some recovery tools rebuild a missing index using a healthy reference clip recorded on the same device with the same settings. Untrunc is a free, open-source tool that does this. The reference clip contains a valid moov atom with the same structure (same codec, frame size, frame rate) as the corrupted file. The tool copies the moov from the reference clip and adjusts the frame offsets to match the corrupted file.
- Locate a working clip recorded with the same device and settings.
- Feed the reference clip and the corrupted file into the recovery tool (for example,
untrunc). - The tool outputs a new file with a rebuilt moov atom.
This method does not re-encode the video, so quality is unchanged.
Remuxing as a Simple Test
If the file already has a moov atom but it sits at the end (common for phone recordings), FFmpeg may still error if the atom is damaged. Remuxing copies the existing streams into a new container without re-encoding. Run:
ffmpeg -i corrupted.mp4 -c copy output.mp4
If the moov atom is intact but mislocated, this command rewrites the file with the moov at the front. If the moov is missing entirely, remuxing produces the same error.
Other Quick Checks
- Try opening the file in a media player that handles incomplete files. Some show partial video.
- Check if the file plays in a video editor that rebuilds indexes automatically. Not all do.
- For iPhone videos, the error moov atom not found iphone video is common after an interrupted recording. The same recovery methods apply.
When to Use a Dedicated Repair Service
If the methods above do not work or you prefer to avoid command-line tools, an online service like mov.repair can process the file. Upload the corrupted MOV or MP4. The service attempts recovery. Quality remains unchanged because the process does not re-encode the streams.