Video recovery guide
FFmpeg Invalid Data Found When Processing Input: Fixes
Invalid data found when processing input means FFmpeg could not read the input as expected. The message alone does not prove an MP4 is missing its moov atom. Read the preceding error lines, check the file you supplied, and keep the original before trying a repair.
1. Confirm the input is the video you intended
- Check the path and file size. A 0-byte file contains no media to remux.
- For a downloaded file, confirm the transfer finished and you did not save an HTML error page with a video extension.
- If another copy plays, transfer it again. Renaming a file extension does not convert its contents.
- For a remote URL, try a complete local copy you are authorized to download. An expired link or server response can also cause an input error.
2. Use ffprobe to inspect the recording
ffprobe -v error -show_format -show_streams "broken.mp4"
If this lists audio or video streams, the container is at least partly readable. If it reports moov atom not found, see the missing-moov guide. If you only see a general invalid-data error, check the earlier messages and the source file instead of assuming one specific cause.
3. Remux readable video and audio to a new file
ffmpeg -n -i "broken.mp4" -map 0:v? -map 0:a? -c copy "recovered.mp4"
This selects available video and audio streams and copies them without re-encoding. The -n option refuses to overwrite an existing output. MP4 must support the source codecs; if the output reports a codec or container error, that is a separate compatibility problem.
Stream copying requires readable input packets. It does not reconstruct an absent index. Check every audio track and the recovered duration afterward. See the official FFmpeg documentation for stream selection and stream copying.
Why ignore_err and faststart are not universal repairs
The decoder option -err_detect ignore_err can continue past some decoding errors. A stream copy using -c copy does not decode and re-encode the video, so adding the flag is not a general way to repair damaged frames or missing container metadata.
-movflags +faststart moves existing MP4 metadata for playback convenience after a successful remux. It cannot create missing source metadata. See FFmpeg's option reference for the documented limits of error-handling flags.
4. Try a reference only when it fits the failure
For a standard MP4 interrupted while recording, surviving media may be recoverable with a compatible reference clip. Match the recorder, codec, resolution, frame rate, and audio settings. A reference-based tool can attempt reconstruction, but it cannot recreate media that was never written.
Read how reference-file repair works or the untrunc guide. For an OBS crash, follow the OBS recording recovery steps.
Try a guided MP4 repair on Windows
StreamSalvage offers local repair attempts and a free preview. Export costs $29 once if you choose to buy. Keep your original, provide a matching reference where available, and inspect the result before purchasing.
Try StreamSalvage on WindowsFrequently asked questions
What does FFmpeg's invalid data found when processing input mean?
FFmpeg could not parse the supplied input as expected. Possible causes include an incomplete file, damaged metadata, the wrong input file, or an unexpected server response. Read the preceding error lines to narrow down the cause.
Can FFmpeg repair an MP4 with a missing moov atom?
A normal FFmpeg remux requires readable input metadata. Stream copy and faststart cannot rebuild a completely missing moov atom. For an interrupted recording with surviving media, a compatible reference-based repair tool may help.
What should I do if ffprobe reports invalid data?
Verify the file path, size, and transfer first, then examine the full error output. If ffprobe lists streams, try a remux on a copy. If it explicitly reports missing MP4 metadata after a recording interruption, consider repair with a matching reference.
Does err_detect ignore_err fix a corrupt MP4?
It can affect how some decoding errors are handled, but it is not a missing-index repair. Stream copying bypasses decoding, and the option cannot create absent media or container metadata.