StreamSalvage

Error explained

FFmpeg "invalid data found when processing input": what it actually means

Last updated July 8, 2026 · ~6 min read

You pointed FFmpeg at a broken recording and got Invalid data found when processing input. You're already on the command line, so here's the short version: FFmpeg's demuxer can't parse the file, and if the recording was interrupted (OBS crash, Streamlabs BSOD, camera power loss), no decoding flag will change that. Here's what's worth trying — and when to stop.

Why FFmpeg rejects the file

FFmpeg reads an MP4 by first locating the moov atom — the index describing every sample in the file. An interrupted recording never got its index written. FFmpeg finds mdat (the raw data) but no map, gives up, and prints invalid data found when processing input. The error is accurate from the demuxer's perspective and misleading from yours: the data is there, it's the structure that's missing.

The commands worth trying (in order)

  1. Probe what's readable:

    ffprobe -v error -show_format -show_streams broken.mp4

    If ffprobe sees streams, you have a partial index and a real chance with FFmpeg alone.

  2. Plain stream copy:

    ffmpeg -i broken.mp4 -c copy -avoid_negative_ts make_zero fixed.mp4

    Works when only the tail of the file is damaged. Fast, lossless, always try it first.

  3. Tolerant read:

    ffmpeg -err_detect ignore_err -i broken.mp4 -c copy fixed.mp4

    Ignores recoverable bitstream errors. Salvages files damaged mid-stream — one OBS user recovered footage up to the exact frame of an NVENC encoder crash this way.

  4. Faststart, for files that play but seek badly:

    ffmpeg -i input.mp4 -c copy -movflags faststart output.mp4

    This relocates an existing moov atom; it cannot create a missing one.

When to stop: if every command above returns invalid data found, the moov atom doesn't exist. FFmpeg cannot rebuild what was never written — no flag combination changes this. You need reference-based reconstruction.

The reference-file method (what actually works)

Tools like untrunc take a healthy clip recorded with the same device and settings and use its structure as a template to rebuild the broken file's index — codec parameters, chunk layout, sample tables. See how reference-file repair works for the full explanation.

Reference repair without compiling untrunc

StreamSalvage runs the same FFmpeg stream-copy first, then falls back to reference-guided reconstruction — drag, drop, preview free, $29 only if it works. 100% local.

Download StreamSalvage for Windows

Frequently asked questions

What does FFmpeg's "invalid data found when processing input" mean?

FFmpeg's demuxer couldn't parse the file: the structure it expected (a valid MP4 header and index) isn't there. On recordings that were interrupted, it almost always means the moov atom was never written, so FFmpeg has no map of the streams.

Can FFmpeg repair an MP4 with a missing moov atom?

No. FFmpeg needs a parseable input; it can't reconstruct a missing index. Flags like -err_detect ignore_err help only when the file is partially readable. For a truly unfinalized MP4 you need a reference-based tool that rebuilds the index from a healthy clip.

Which FFmpeg flags are worth trying on a broken MP4?

Try a plain stream copy first (ffmpeg -i broken.mp4 -c copy out.mp4), then -err_detect ignore_err, and ffprobe to see what's readable. If every command returns "invalid data found when processing input", stop — the container needs rebuilding, not decoding.

What should I use when FFmpeg can't read the file at all?

A reference-file repair tool. It takes a short healthy clip recorded with the same settings and uses its structure to rebuild the broken file's index. untrunc does this on the command line; StreamSalvage does it with a drag-and-drop GUI, free preview, and no upload.