Zum Inhalt springen

Repair an MP4 File: 7 Methods That Actually Work (2026)

Trying to rescue a broken MP4 file? These 7 methods — from the VLC trick to a pro tool — work in practice. With an honest success rate for each one.

T

Thomas

Founder · Engineer · May 18, 2026 · 4min read

In short: If your MP4 won’t play, 80% of the time it’s because of a missing header (the moov atom). VLC can repair simple cases, ffmpeg a bit more, and for heavy damage you need a specialized tool. Here’s the honest order to try them in.

Why MP4 files break in the first place

Most “broken” MP4s aren’t destroyed — they’re cut off. While recording, the camera only writes raw data (the mdat atom) and doesn’t tack the header (the moov atom) onto the end until you hit stop. If the battery pops out, the SD card gets pulled, or the app crashes, that header is missing — and every player says “can’t open.”

The most common causes:

  • The battery in your GoPro / drone died mid-recording
  • The SD card was removed while recording
  • The iPhone / Android recording app crashed
  • A screen recording (OBS, QuickTime) was closed uncleanly
  • The file was recovered from a formatted card with DiskDrill / Recoverit

Method 1: Try “Repair” in VLC

VLC can fix simple header problems on the fly.

  1. Open VLC
  2. File → Convert / Save
  3. Pick the broken file, then click Convert
  4. Profile: “Video — H.264 + MP3 (MP4)”
  5. Choose a destination file, click Start

Success rate: ~30%. Works on lightly damaged files, but fails in a lot of GoPro/drone cases because VLC doesn’t rebuild the container.

Method 2: ffmpeg remux

When the container is broken but the streams are intact:

ffmpeg -i kaputt.mp4 -c copy -movflags faststart repariert.mp4

Success rate: ~40%. Helps when it’s only the container structure that’s scrambled.

Method 3: untrunc (open source)

untrunc reconstructs the header from the mdat stream. You need an intact reference file from the same camera and resolution:

untrunc gute-datei.mp4 kaputte-datei.mp4

Success rate: ~70% — if the reference genuinely matches. That’s the part that decides everything. A 50p recording as a reference for a 25p file produces useless results. With iPhones and newer Sony models it’s often tricky.

Downsides: it’s a CLI tool with no UI, no audio-drift correction (it produces files with the sound skewed), and no noise-burst removal at the start of the audio.

Method 4: Fix audio drift by hand

After Method 3 you’ll often run into the problem that the audio runs 400–700ms ahead of or behind the picture. You can fix that with ffmpeg:

ffmpeg -i video.mp4 -itsoffset -0.480 -i video.mp4 \
  -map 0:v -map 1:a -c copy synced.mp4

The 0.480 is the measured drift in seconds — and figuring that out is the first thing you have to do. It’s detective work with Audacity or an NLE.

Method 5: HxD / hex editor

For pros: rebuild the header by hand, copying moov atoms from a reference file and adjusting the size offsets. Please only do this if you know what you’re doing.

Success rate: very high if you genuinely understand the format — but that’s roughly 1 in 1000 readers.

Method 6: Online tools (Restore.Media, etc.)

These work technically much like untrunc, but:

  • You have to upload your videos (privacy!)
  • €5–10 per file, often per started GB
  • Server queue: often hours of waiting
  • Audio drift is rarely corrected

Honest verdict: fine for a one-off file if you don’t care about privacy. For sensitive material (weddings, business footage), not a good idea.

Method 7: A specialized desktop tool

This is where Haven comes in. We do exactly what the methods above can do individually — but in one step, with a UI, no cloud, with automatic audio-drift correction and reference matching.

→ Download Haven here

If you really have no other choice and the video matters, a tool built for exactly this is worth every cent. And with us, only if the repair actually worked — otherwise the analysis costs nothing.

Which method for which kind of damage?

DamageRecommendation
File plays with sound but stuttersMethod 2 (ffmpeg remux)
File won’t open, simple recordingMethod 1 (VLC) → Method 2
GoPro / Sony, normal resolutionMethod 3 (untrunc) + Method 4 (audio)
iPhone video brokenMethod 7 (Haven) — iPhones write length-prefixed NAL, which untrunc often can’t handle
DiskDrill-recovered fileMethod 7 — broken headers are nearly impossible to rebuild by hand
Screen recording (OBS / QuickTime)Method 2 → Method 7
File is only partially thereMethod 7 — only Haven (or untrunc + audio cleanup) gives usable results

What to avoid

  • “Repair tools” from the Microsoft Store or Mac App Store that cost under €5: usually these are relabeled ffmpeg wrappers that do exactly what Method 2 does.
  • Data-recovery suites like Stellar or Wondershare when all you want is to repair one video — they cost €70–150 and pack in 99% of features you don’t need.
  • Paying before you see the result. Whatever the tool: any reputable program shows you the result before you pay.

Bottom line: Methods 1–4 are free and cover the easy cases. If they don’t get you there and the video matters enough, a specialized tool is worth it. The main thing: don’t spend a cent before you’ve seen the preview.

About the author

T

Thomas

Founder · Engineer

Built Haven after losing footage on a Sony FX3 shoot. Three weeks of reverse-engineering later he had the recording back — and decided to polish the tool for everyone else. Writes about the engineering deep end.

Specialty · Container reverse-engineering · ISO BMFF · Codec internals

View profile →

Newsletter

When a new repair guide goes up — one email. Monthly at most.

No marketing sequences, no promo blasts. Just a heads-up when a new pillar guide, codec deep-dive or honest comparison goes live.

No spam. One-click unsubscribe from every email.