MP4 file shows 0 seconds? Why it happens and how to fix it
By the FixMP4 engineering team · · 9 min read
Few error states are as confusing as a video that exists, has a thumbnail or a plausible file size, and yet shows a duration of 0:00. Press play and nothing happens, or the player jumps straight to the end. Some players display "00:00:00", others refuse to open the file at all, and a few show only a black frame.
The cause is almost always the same, and in many cases the video is entirely recoverable. This article explains why an MP4 shows zero seconds, how to tell whether yours can be saved, and how to fix it.
Where a video's duration comes from
An MP4 or MOV file has two main parts:
- mdat, the media data: all the compressed video and audio frames, which make up nearly all of the file's size.
- moov, the index: a compact description of every track, the codec settings, where each frame sits in the file, how long each frame lasts, and the total duration.
Players read the moov atom first. That is where they learn the duration, the resolution, and how to find and decode each frame. If there is no moov atom, there is no duration to show, so the player reports 0:00 or an error. The structure is explained in more depth in what is the moov atom.
Why the index is missing
Most recording devices write the index only when recording stops, because only then do they know how many frames there are. Anything that stops the recording abruptly leaves a file with frames but no index:
- Battery died or the device shut down.
- App or camera crashed.
- Card or disk full.
- Card removed or the cable pulled during recording or copying.
- Transfer interrupted, for a file whose index sits at the end.
The file system still records the file's size, so you see a large file, but its contents end before the index.
Step 1: Check the file size
This one check tells you almost everything:
| File size | Meaning | What to do |
|---|---|---|
| 0 KB | No data written | Not repairable; try data recovery |
| A few KB | Only the header was written | Not repairable |
| Roughly what you expect for the length recorded | Frames present, index missing | Repairable |
| Much smaller than expected | Partially written; part of the video present | Partly repairable |
As a rough guide, a minute of 1080p video at 30 fps from a phone is 60 to 130 MB, and 4K is two to four times that. Audio-only recordings are much smaller: a minute of AAC voice recording is roughly 0.5 to 1 MB.
Step 2: Make sure it is not a different problem
- Try VLC. If VLC plays the file and shows a correct duration, the file is fine and your usual player has a problem, often a missing HEVC codec.
- Check the original. If this is a copy, check whether the original on the device has a duration. If it does, copy it again.
- Check cloud downloads. A file still downloading, or a placeholder from a sync service, can show 0:00 until it finishes.
Step 3: Rebuild the index
If the file is large and nothing plays it, the index needs to be rebuilt by reading the frames directly. FixMP4 does this in your browser:
- Open the repair tool and drop in the 0-second file.
- For video, also add a reference file: a short healthy clip from the same device with the same settings. The codec settings that were lost with the index are taken from it. See how to choose a reference file.
- For audio-only M4A files, such as iPhone Voice Memos, you can usually skip the reference.
- The tool scans the frames, measures each one, rebuilds the index and plays a free preview.
- When the preview looks right, export the full file with a subscription.
The file is never uploaded: it is read directly from your disk by the browser, so large files work and private footage stays private.
What the repaired file contains
- Every frame that was written to the file, typically everything except the last second before the failure.
- A correct duration, seeking and keyframe table, so it plays and edits normally.
- Not restored: metadata that only existed in the lost index, such as location or the device's recording date in some cases.
Files that show a duration but stop early
A close cousin of the 0-second file is a video that shows a duration, but much shorter than the recording, or one that plays for a while and then stops. This can happen when a device writes a temporary index part way through, or when a file was rewritten by an app that saw only part of the data. If the file size is much larger than the duration suggests, the remaining frames are still in the file after the point where playback stops. Rebuilding the index from the raw frames, rather than trusting the existing one, recovers them. The same steps apply: add a reference for video, check the preview, and compare the new duration with how long you remember recording.
Supported formats
| Format | Supported |
|---|---|
| MP4, MOV, M4V, M4A containers | Yes |
| H.264 (AVC) and H.265 (HEVC) video | Yes |
| AAC audio | Yes |
| ProRes, AV1, VP9 video | No |
| ALAC (lossless), Opus, PCM audio | No |
| MKV, AVI, TS containers | No |
| Fragmented MP4 (DASH segments, some OBS modes) | No |
Why "fixing" with a converter does not work
You may be tempted to run the 0-second file through an online converter or a video editor. These tools rely on the index to know what is in the file, so they fail the same way your player does, or produce an empty output. Renaming the file to .mov or .avi does not help either, because the index is missing regardless of the extension. The index has to be reconstructed from the frames, which is what dedicated repair tools do. For a comparison of approaches, see video repair tools compared.
When the file is 0 KB
A truly empty file is a different problem. The file system created the entry, but no data reached it, or the data was written to the card without the file system being updated. In that second case, the frames might still be on the card, outside any file. A data recovery tool that scans the raw card can sometimes find them. Stop using the card and see how to recover video from a corrupted SD card. If a recovered file then shows 0:00, it is back to the repairable case above.
Preventing 0-second videos
- Stop recording before the battery is critically low.
- Keep free space on cards and phones, especially for long recordings.
- Wait a moment after stopping before removing the card or turning the device off.
- Use crash-safe recording formats where available, such as MKV in OBS.
- Verify that important recordings play before deleting anything from the device.
Summary
An MP4 that shows 0 seconds but has a real file size almost always has its frames intact and only the index missing. Check the size, rule out codec and sync problems, and then rebuild the index. Try a free preview to see your video come back. For the format details, see our guides on fixing moov atom not found and repairing MP4 files.
Frequently asked questions
Why does my MP4 show 0 seconds?
The duration of an MP4 is stored in its index, the moov atom. If recording or copying stopped before the index was written, players cannot read the duration and show 0:00, even though the video data is present.
Is an MP4 with 0 seconds duration recoverable?
If the file size is large, usually yes: the frames are in the file and the index can be rebuilt. If the file size is 0 KB or a few kilobytes, there is no video data to recover.
How do I check if a 0 second video contains data?
Look at the file size in your file manager. A minute of 1080p video is typically 50 to 200 MB. A large size with 0:00 duration means the data is there but the index is missing.
Can I fix a 0 second MP4 by renaming or converting it?
No. Renaming does not add a missing index, and most converters need a readable index to start. The index has to be rebuilt from the frames in the file.
Have a broken recording right now?
Diagnose it and hear or watch a free repaired preview. Nothing is uploaded.
Open the repair tool