After experimental restauration of btrfs sparse file image, a lot of my video files have missing or added bytes, but only some (file sizes are identical to size of original except < 100 bytes). Is there a program which can

  1. recognize the video container and encoding (could may also be done separately with a script)
  2. repair the video file based on eventually existing checksums (I have no idea how popular video formats work)
  3. recognize missing bytes causing the failure of rendering for single images/sequences and replace them with black images

(1. is optional, 2. and 3. alternatives for each other)?

1 Answer 1


Completely depends on the video codec and container format, there is no general tool to fix corrupted video files. Regarding avis with missing headers there is a good answer on this question.

The info there also helps with recovering other video formats.

To find more info about a certain file I recommend using MediaInfo in addition to ffprobe. It offers some more info about codecs and container properties than ffprobe and is easier to read.

If chunks in the video stream are corrupt it won't hinder playback of the stream you will just experience artifacts around these chunks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.