Merge a folder full of videos into one video — even if the files are a chaotic mix of codecs and formats.
This is a Windows-only GUI script powered by FFmpeg.
🎬 Works with: MP4, MKV, MOV, WEBM, AVI, TS, M2TS, WMV (and more)
🪟 Windows only: tested on Windows 10/11
🚀 Optional: NVIDIA GPU acceleration (NVENC) if your FFmpeg supports it
- You pick a folder of videos
- It sorts them in natural order (so
1, 2, 3... 10, 11...not1, 10, 100) - It converts them to a single consistent format/codec (because mixed codecs cannot be stitched as-is)
- It merges everything into one output file
- If anything fails, it shows the error in a window with a Copy error button
Basically: it’s duct tape for video folders. The good kind. The “fixes everything” kind.
- Windows
- FFmpeg + FFprobe installed and available in PATH
- PowerShell (already included with Windows)
Note: FFprobe comes bundled with FFmpeg. You don’t install it separately.
FFmpeg’s official site links to compiled builds because FFmpeg itself is primarily distributed as source code.
Pick one of these two easy routes:
- Open Windows Terminal or Command Prompt
- Run:
winget install -e --id Gyan.FFmpeg-
Download a Windows build (contains
ffmpeg.exe+ffprobe.exe) -
Extract it to a simple folder like:
C:\ffmpeg\ -
Add the
binfolder to PATH:- Press the Win key, search: Environment Variables
- Open: Edit the system environment variables
- Click: Environment Variables
- Under System variables, select Path -> Edit
- Click New and add:
C:\ffmpeg\bin - Click OK, OK, OK
-
Close and reopen Terminal
Recommended build sources:
FFmpeg downloads page (official): https://www.ffmpeg.org/download.html
Gyan.dev Windows builds: https://www.gyan.dev/ffmpeg/builds/
BtbN GitHub builds: https://github.com/BtbN/FFmpeg-Builds/releases
Open a new Command Prompt and run:
ffmpeg -version
ffprobe -versionIf both print version info, you’re done.
-
Download this repo (green Code button -> Download ZIP) and unzip it
-
Double-click:
MergeVideos.cmd -
Choose your settings in the dropdowns:
- Input folder (where your videos are)
- Output file (optional; if you don’t pick one, it exports next to the script)
- Format (MKV or MP4)
- Codec (H.264 or H.265)
- Acceleration (Auto / NVIDIA GPU / CPU)
- Quality (Lossless / Very High / High / Medium / Small)
- Speed (Fast / Balanced / Slow)
- Audio (AAC or FLAC when using MKV)
-
Click Start
You’ll get a progress window showing:
- which file is being processed
- overall progress
- ETA
- If your folder contains mixed codecs (VP9, AV1, H.264, etc.), re-encoding is required to merge into one continuous file.
- “Lossless” means: no additional quality loss during the re-encode step (but your originals may already be lossy).
- Lossless output files can be huge. Like “my SSD just looked at me funny” huge.
If you have an NVIDIA GPU and your FFmpeg build supports NVENC, you can enable it in the dropdown. If NVENC isn’t available, the script will fall back to CPU options.
This script is plain text. You can (and should) inspect it before running.
If you’re cautious (good instinct):
- open
MergeVideos.cmdin Notepad and read it - paste it into any AI/code-review tool and ask: “What does this do?” (totally fine)
- run it on a small test folder first
No installers, no hidden downloads, no mystery meat. Just FFmpeg doing FFmpeg things.
- Install FFmpeg and add it to PATH (see install steps above)
- Restart Command Prompt/Terminal after changing PATH
-
The error window includes a Copy error button
-
Paste the copied text into a GitHub Issue and include:
- the filename that failed
- your chosen settings (format/codec/quality/speed/acceleration)
- Try MKV. MKV is more forgiving and usually the best “just work” container.
- Drag-and-drop input folder
- Option to merge only a selected range (Episode 1–50)
- Remember last used settings
MIT (do whatever you want, just don’t blame me if you merge your entire life into a single file).