GithubHelp home page GithubHelp logo

shahriarshanto / checkmate Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 37 KB

Windows Tool to check media files (audio, videos & photos) for corruption using FFmpeg

License: GNU General Public License v3.0

Batchfile 90.13% PowerShell 9.87%

checkmate's Introduction

CheckMate

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

Example Usage

Example

Setup:

  • 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.

How to use:

Open Command Prompt and change directory to the folder with media files:

Usage: CheckMate [FILTER]

Filter is used to look for files. in current directory + subdirectories.

Asterisk or Star * is wildcard, means “It can be anything”

Example Commands:

To check all MP3 files

CheckMate *.mp3 Meaning: Any file with .mp3 at the end

To check all MKV files

CheckMate *.mkv Meaning: Any file with .mkv at the end

To check all files in the directory + subdirectories

CheckMate * Just a star, means any file

Note: If you give no filter, the default filter is *.mp4

So it will check all MP4 files in current directory + subdirectories.

A list of corrupted files will be at “Corrupted Files.txt”

Learn more

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!

Temporary file:

A log file is created while testing called “CheckMate Log.txt” Let it be. Do not delete / open / edit it.

You should know:

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.

Credits:

Coded with ♥ by Shahriar Shanto

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.