Videos recovered from a formatted memory card are corrupted after recovery. Can they be uncorrupted?

By | April 3, 2018

I frequently come across this question when browsing forums and other PC help sites: Videos which are recovered from a formatted memory card can get corrupted after recovery. Can they be un-corrupted or repaired?

Well, that depends on how corrupt the files are and how they became corrupt. There is a more than fair chance that the recovered files are corrupt due to something called file fragmentation.

Can recovered, corrupt video files be repaired?

Problem with recovery from memory cards is often file fragmentation:

  • Conventional undelete and file recovery software: File system is either FAT32 or exFAT. This means ‘normal’ undelete and file recovery tools can not get the entire file when it’s fragmented. This is not because the software is bad, it’s a limitation of FAT where the chain of clusters in the File Allocation Table is ‘reset’ when a file is deleted or a card is formatted. To recover a file, the recovery software has to rely on the start cluster + the file size. This is not a problem when the file is contiguous, it however is when it is fragmented.
  • Almost all specialized photo/video recovery software is header/footer carving based. This means they detect the start of a file (using magic bytes or file signature) and the end. Everything in between is copied to a new file. This is okay for contiguous files, but not for fragmented files.

As a result, recovered files that were fragmented are simply missing data and/or have data mixed in from other files. This missing data can not be brought back or repaired by video repair software.

Our telemetry (JPEG Recovery LAB) shows that 79% of all video files on memory cards is fragmented! Note that this is a mix of cards from cameras, smart phones, action cams (GoPro etc.) and dash cams.

So, if the root of the problem is corruption caused by file fragmentation, rather than trying to repair the corrupt recovered files, a better idea is to recover the files again with software that can cope with fragmented files.

You can preview your MP4 videos in JPEG Recovery LAB before recovering them

You can preview your MP4 videos in JPEG Recovery LAB before recovering them

Advanced carving is needed to recover fragmented files

Our photo and video recovery software JPEG Recovery LAB tries to reconstruct fragmented files while recovering them from a memory card. To do so it will first scan the device for file starts using ‘magic bytes’. For example, JPEG files all start with a certain sequence of bytes. Once it has scanned the memory card it will:

  1. Keep adding consecutive clusters and render the block of clusters. Rendering means so much as, running the data through a JPEG  decoder (or MP4 or whatever decoder is needed for the file type) and determine if it results in a valid file. If so then we have a valid file.
  2. For files that can’t be correctly decoded JPEG Recovery LAB will examine other clusters and look for a best match. If adding that cluster can be decoded in combination with the first cluster(s) it is added to the file and the search continues and the process repeats until the end of a file is reached.

JPEG Recovery LAB works it’s way through all files and will divide the detected files in 3 categories:

  1. Contiguous files
  2. Fragmented files
  3. Corrupt files

Currently JPEG Recovery LAB supports MP4, MOV, AVI and MPEG-2 video formats.

It is also possible that corruption is due to other reasons. In which case you can opt for video repair, for example by Aero Quartet. Or maybe use software like Stellar’s Video Repair. And here is a great article from Tehnoblog that contains more DIY tips.

Leave a Reply

Your email address will not be published. Required fields are marked *