MediaRuntimeComparator is a Windows PowerShell GUI tool that helps you identify duplicate or near‑duplicate media files by comparing their runtime, size, and name.
It leverages ffprobe from the FFmpeg project to extract accurate duration metadata.
- 🖥️ GUI interface built with Windows Forms (no command‑line needed)
- 🔍 Recursive scan of folders for video and audio files
- ⏱️ Displays duration (HH:MM:SS), (milli)seconds, and file size
- 🎯 Highlights potential duplicates within a configurable tolerance (0–60s)
- 🗑️ Right‑click to delete files directly from the list
- 📂 Double‑click to open files in your default media player
- 💾 Saves settings (last folder, window size, tolerance, ffprobe path) between sessions
- Windows with PowerShell 5.1+ (or PowerShell 7 with Windows Forms support)
ffprobe.exe(part of the FFmpeg tools, available at ffmpeg.org/download)
-
You have two options to get started:
Option A – Clone the repository
- Run
git clone https://github.com/yourusername/MediaRuntimeComparator.gitand thencd MediaRuntimeComparator.
Option B – Copy the script directly
- Navigate to the Files section of this repository
- open
MediaRuntimeComparator.ps1 - click Raw → then copy and paste the contents into a new file named
MediaRuntimeComparator.ps1on your computer.
- Run
-
Ensure
ffprobe.exeis available:- Download it as part of the official FFmpeg builds.
On Windows, you can grab a pre‑compiled zip from gyan.dev or BtbN builds.
Inside the archive you’ll findbin\ffprobe.exe. - Place
ffprobe.exein the same folder as the script, or - Set its path in the GUI once the app is running.
- Download it as part of the official FFmpeg builds.
-
Run the script in your powershell terminal:
- Execute
powershell -ExecutionPolicy Bypass -File .\MediaRuntimeComparator.ps1.
- Execute
-
In the GUI:
- Select a folder to scan
- Click Scan
- Review results, delete duplicates, or open files directly
Instead of typing the PowerShell command every time, you can create a shortcut to run the script with a double‑click:
- Right‑click on your desktop → New → Shortcut
- In the location field, paste the following (adjust the path to where you saved the script):
powershell.exe -ExecutionPolicy Bypass -File "C:\Path\To\MediaRuntimeComparator.ps1" - Click Next, give it a name (e.g.
MediaRuntimeComparator), and finish. - (Optional) Right‑click the shortcut → Properties → Change Icon… to give it a custom look.
- Now you can launch the tool anytime with a double‑click.
💡 Tip: You can also pin the shortcut to Start or Taskbar for even faster access.
A config file MediaRuntimeComparator.cfg is automatically created in the script directory.
It stores:
- Last used folder
- Window size
- ffprobe path
- Tolerance setting
The tool recognizes most common video and audio formats, including:
.mp4, .mkv, .avi, .mov, .wmv, .flv, .webm, .ts, .m2ts, .m4v, .mpg, .mpeg, .3gp, .3g2, .ogg, .ogv, .ogm, .vob, .divx, .rm, .rmvb, .asf, .f4v, .mxf, .mts, .m2v, .mp2, .mp3, .aac, .wav, .flac, .alac, .wma, .m4a, .opus, .aiff, .au, .ac3, .dts, .amr, .caf
Contributions, issues, and feature requests are welcome!
Feel free to open an issue or submit a pull request.
This project is licensed under the MIT License – see the LICENSE file for details.
