Documentation

VidRepair

Technical reference for repair strategies, viability analysis, and settings.

Overview

VidRepair is a Windows desktop application that repairs corrupted video container files entirely on-device. It uses a bundled copy of ffmpeg to run multiple recovery strategies in sequence — stopping as soon as one produces a valid output.

No account, no internet connection, and no external software installation is required. The ffmpeg and ffprobe binaries are bundled with the application.

Getting started

Repairing a file takes three steps:

  1. 1

    Drop your file

    Drag a corrupted video onto the drop zone or click to browse. You can also drop multiple files to build a batch queue.

  2. 2

    Set an output directory

    Choose where repaired files are saved. The original file is never modified — all output is written to the directory you select.

  3. 3

    Start repair

    VidRepair runs each applicable strategy in sequence and stops on the first successful result. Progress is shown in real time.

Note — If you have a working video from the same camera and settings as the corrupted file, provide it as a reference file before starting — it significantly improves recovery success for files where the moov atom was never written.

Supported formats

VidRepair supports the following container formats. The number of strategies attempted varies by format — MP4 and MOV receive the most comprehensive treatment.

FormatExtensionsStrategies
MP4 / MOV / 3GP.mp4 .mov .3gp9Most comprehensive
MKV / WebM.mkv .webm3
AVI.avi3
FLV.flv3
WMV.wmv2

Repair strategies

Strategies run in order of increasing destructiveness. VidRepair stops and returns the output as soon as one strategy produces a valid result. Each attempt is logged individually so you can see exactly what was tried.

StrategyTypeDescription
remuxContainer copyRepackages streams into a fresh container without re-encoding. No quality loss.
faststartMP4-specificMoves the moov atom to the start of the file. Fixes files that can't be opened or seeked.
genptsIndex rebuildRegenerates presentation timestamps and ignores broken DTS. Fixes malformed header timing.
mkv_remuxContainer switchRe-muxes into a Matroska container, which is more tolerant of timestamp issues than MP4.
raw_h264Stream scanBypasses the container and reads the file as a raw H.264 stream with ffmpeg error concealment.
raw_hevcStream scanSame as raw_h264 but targets H.265 / HEVC streams.
mpegtsStream scanReads the file as MPEG-TS. Useful for cameras that embed a TS stream inside a MOV wrapper.
m2tsStream scanM2TS variant with a 50 MB resync window. Covers AVCHD cameras such as GoPro.
mdat_rescueMoov reconstructReference-file only. Extracts SPS/PPS headers from the reference and reconstructs the H.264 stream from the corrupted file's mdat payload.
rescue_encodeRe-encodeLast resort. Decodes and re-encodes to H.264/AAC MP4. Quality loss applies. CRF is configurable.
Note — You can disable individual strategies in Settings → Disabled strategies. Use this if a particular strategy consistently produces unusable output for your file type.

Reference file

A reference file is a healthy, playable video recorded on the same camera with the same codec, resolution, and frame rate as the corrupted file.

When a reference file is provided, VidRepair adds the mdat_rescue strategy to the pipeline. This strategy extracts the H.264 SPS/PPS parameter sets from the reference and uses them to reconstruct a valid stream from the corrupted file's raw media payload (mdat atom).

This is most effective when the corruption is a missing or incomplete moov atom — for example, when a camera loses power mid-recording and never finalised the file.

Warning — The reference file must share the same codec, resolution, and frame rate as the corrupted file. Using a mismatched reference will cause mdat_rescue to fail or produce a broken output.

Viability check

Before attempting repair, VidRepair analyses the file and returns a viability verdict. The check computes Shannon entropy on the first 64 KB of the file and scans for known container atoms or signatures.

Repairable

A valid container atom was detected. Repair is likely to succeed.

Possibly repairable

Low entropy data detected but no container signature found. Recovery may be incomplete.

Overwritten

High entropy with no valid container. The original video sectors have been overwritten with other data.

Empty

The file is zero-filled or empty. There is no data to recover.

Warning — If the viability check returns Overwritten, no software repair tool can recover the file. Try a forensic sector scanner such as PhotoRec on the original storage device instead.

Batch repair

Drop multiple files onto the drop zone to build a queue. Files are processed one at a time using the same output directory and reference file settings applied to all.

A failure on one file does not stop the queue — VidRepair logs the result and moves to the next file. After a batch completes, use Clean up folder to remove any output files that failed validation, leaving only playable results.

Settings

All settings are persisted locally. They can be found in the Settings panel.

SettingDefaultDescription
Re-encode CRF23Quality level for the rescue_encode strategy. Lower = better quality, larger file. Range 18–28.
Output suffix_repairedText appended to the output filename. E.g. video_repaired.mp4.
Quick scanOffRuns only the first three strategies. Faster but may miss fixes that later strategies would catch.
Disabled strategiesNoneStrategies to skip. Use this if a strategy consistently produces bad output for your files.
Auto-open folderOffAutomatically opens the output folder in Explorer after a successful repair.
Auto-save logOffWrites a .vidrepair_repair.log file alongside each repaired output.
ThemeSystemApplication colour scheme. Follows OS preference by default.

Output validation

Every repaired output is validated with ffprobe before being marked as a success. A file must pass all three checks:

  • A readable video stream is present
  • Duration is at least 0.5 seconds
  • File size is at least 50 KB

If the repaired output's duration is under 5 seconds but the input file was larger than 50 MB, VidRepair marks the result as a partial recovery and warns you that the recovered video is significantly shorter than expected. This typically means part of the media data was overwritten.

Limitations

VidRepair cannot recover files where:

  • The media data itself has been overwritten — not just the container index
  • The storage device has physical damage (run hardware-level recovery first)
  • The file is encrypted or DRM-protected
  • The corruption type is not addressed by any of the available strategies
Warning — For files with near-random entropy (reported as Overwritten by the viability check), the video data is gone at the filesystem level. No software repair tool can recover it — only forensic sector scanning of the original storage device has any chance of recovery.