untrunc is a free, open-source tool that repairs MP4/MOV files whose index (moov) was never written — the classic camera-died-mid-recording failure. When it fits your case, it genuinely works and you don't need us or anyone else. This guide covers how to run it — and, because we repair the files it can't, an honest map of where it fails.
untrunc takes two inputs: your broken file and a healthy reference video from the same camera at the same settings. It reads the reference's index to learn how that camera lays out its frames, then walks the broken file's raw data and rebuilds a matching index. The reference is not optional decoration — it is where the codec parameters and layout knowledge come from.
The original project (ponchio/untrunc) has been dormant
for years. Use the actively maintained fork,
anthwlock/untrunc
— it handles more codecs and more camera quirks, and its GitHub
Releases page has prebuilt Windows binaries, so on
Windows there is nothing to compile.
untrunc reference.mp4 broken.mp4
That's the whole interface: reference first, broken file second. The
repaired output is written next to the broken file as
broken.mp4_fixed.mp4. On Windows, drop both files next to
the downloaded .exe and run that command in a terminal in
the same folder. On Linux/macOS you build from source
(make, with ffmpeg/libav development libraries
installed) — the fork's README also documents a Docker route if you'd
rather not install build tools.
untrunc is at its best on classic camera files: H.264 + AAC, codec setup data carried in the stream, reference from the identical device. The failure cases are less documented, and they matter — we see the aftermath of most of them:
If you're comfortable in a terminal and have a matching reference clip: try untrunc first. It's free, and when it fits, it's done. If it fails, produces a file that doesn't fully play, or your case is one of the families above — that's exactly the territory we built for, and finding out costs nothing.
Upload the original broken file (plus a reference clip if you have one). You pay only if we hand back a file that actually plays.
No — the reference is where untrunc learns the camera's frame layout and codec parameters, so it is required. If you have no healthy clip from the same camera at the same settings, untrunc is not your path; our catalog of known camera models can often supply the missing knowledge instead, with no reference upload.
This is untrunc's best-known trap: it can write a full-size output and report success while the rebuilt index doesn't match the real frames — the result plays partially, silently, or not at all. It usually means the reference didn't truly match or the file's structure is outside what untrunc models. The original broken file is still recoverable by other means — upload that, not untrunc's output.
Generally no. Those recorders don't store codec setup data in the stream, which is the ingredient untrunc's rebuild depends on, and a reference recording rarely supplies it. That family needs the missing parameters to be solved by search against the actual frames, which is how our recovery handles it.
untrunc writes a new output file and does not modify the broken input. Still, follow the universal rule: keep an untouched copy of the original before running any tool on it, and never work directly on the memory card.
You wouldn't, and we say so plainly: when untrunc fits your case, use it. We exist for the files it can't fix — mismatched or missing references, screen-recorder families, unusual codecs, false-success outputs — and our free analysis tells you whether your file is recoverable before any payment.