Tool to check media files (audio, video and photos) for corruption.
The test is performed using FFmpeg
Command used: ffmpeg -v error -i "File/to/check.mp4" -f null
- Download CheckMate v1.0.zip | Google Drive Mirror
- Extract the “CheckMate” folder anywhere
- Run Setup.bat
- This will copy the files to C:\CheckMate\
- Add C:\CheckMate\ to your PATH
- Press “Windows + S”
- Write “env”
- Select “Edit the system environment variables”
- Click on “Environment Variables”
- Under “User Variables” select “PATH”
- Click on “Edit” then on “New”
- Copy-Paste this:
C:\CheckMate\
- It’s done. Click “OK” everywhere.
Open Command Prompt and change directory to the folder with media files:
Filter is used to look for files. in current directory + subdirectories.
CheckMate *.mp3
Meaning: Any file with .mp3 at the end
CheckMate *.mkv
Meaning: Any file with .mkv at the end
CheckMate *
Just a star, means any file
The command in the script:
ffmpeg -v error -i "File/to/check.mp4" -f null
Actually it's job is to convert the media file to null i.e. nothing
So, FFmpeg reads the whole file for the conversion.
When it finds any errors in it, tells us! This is how the script works.
It may take a long time to read the whole file. Testing all your movies will take hours to complete!
A log file is created while testing called “CheckMate Log.txt” Let it be. Do not delete / open / edit it.
If a file is found to be corrupted according to FFmpeg, it doesn’t mean it is not useful to you.
It may be played fully without any error, without any glitch in audio / video. So you don’t have to delete them all.
But it might have got corrupted during download, copy, re-encode, remux etc. So, you may want to do that again from the source and recheck.
-
FFmpeg from https://www.gyan.dev/ffmpeg/builds/
-
FFmpeg command and basic script structure was found in StackExchange answer by Juan Antonio Tubío: https://superuser.com/a/1241089
-
A few lines of code from this github repo was used too.
-
Rest of the scripting was done by me