Normalize Video is a CLI tool to automatically organize and standardize your video library. It renames files, creates folder structures, and updates MKV metadata.
Transform messy video files into a clean, organized library:
Before: big.buck.bunny.2008.1080p.bluray.x264.mkv
After: Big Buck Bunny - 1080P.mkv
Location: /destination/Movie/Big Buck Bunny - 1080P.mkv
Before: blender.studio.s01e01.spring.1080p.web.h264.mkv
After: Blender Studio S01E01 - 1080P.mkv
Location: /destination/Serie/Blender Studio/S01/Blender Studio S01E01 - 1080P.mkv
- β Automatic detection: Movies vs TV Series
- β Smart naming: Extracts title, season, episode, quality, language
- β Folder structure: Auto-creates organized directories
- β Recursive scanning: Processes all subfolders
- β MKV metadata: Sets correct audio/subtitle tracks
- β Multi-language: Supports 10+ languages
- β Parallel processing: Fast batch operations
- Go 1.21+ - Install Go
- mkvtoolnix (optional) - For MKV metadata updates
# Install dependencies
make init
# Run
make start
# Build
make build
./normalize_videoEdit config/constants.go:
const (
ORIGIN_PATH = "/home/user/Downloads/" // Source folder
DEST_PATH = "/media/videos/" // Destination folder
// Recursive scanning
RECURSIVE_SCAN = true // false = only scan root folder
// MKV Metadata Configuration
PREFERRED_AUDIO_LANG = "en" // en, fr, de, es, ja, etc.
FALLBACK_AUDIO_LANG = "" // Leave empty for no fallback
PREFERRED_SUBTITLE_LANG = "en"
FALLBACK_SUBTITLE_LANG = ""
SUBTITLE_FORCED_ONLY = true // Only select forced subtitles
MAX_WORKERS = 10 // Parallel processing workers
)When RECURSIVE_SCAN = true, all subfolders are processed:
/Downloads/
βββ movie1.mkv β Processed
βββ Movies/
β βββ movie2.mkv β Processed
βββ Series/
βββ Show/
βββ episode.mkv β Processed
When RECURSIVE_SCAN = false, only files in the root folder are processed.
# Process all videos in source folder
make start+------------------------------+-------------------------------------------------------+
| KEY | VALUE |
+------------------------------+-------------------------------------------------------+
| Episode | E01 |
| MkvMetadata.MkvAudioTrack | english ac3 5.1 |
| MkvMetadata.MkvSubTrack | english (forced) |
| Normalizer.Title | Sintel |
| SE | S01E01 |
| Video.Language | en |
| Video.Quality | 1080p |
+------------------------------+-------------------------------------------------------+
Movies processed: 5
Series processed: 12
Total videos processed: 17
/destination/Movie/
βββ Big Buck Bunny - 1080P.mkv
βββ Sintel - 720P.mkv
βββ Elephants Dream - 4K.mkv
/destination/Serie/
βββ Blender Studio/
βββ S01/
β βββ Blender Studio S01E01 - 1080P.mkv
β βββ Blender Studio S01E02 - 720P.mkv
βββ S02/
βββ Blender Studio S02E01 - 4K.mkv
avi, mkv, mp4, mpeg, mpg, mov, wmv, flv, webm, m4v, 3gp, ts, mts, m2ts
480p, 720p, 108
8B9C
0p, 2160p, 4k, 8k, uhd
web, webdl, web-dl, webrip
bluray, bdrip, dvdrip, hdtv
French: vf, vff, vfi, french, truefrench
English: vo, english, en
German: german, deutsch, de
Spanish: spanish, es
Italian: italian, it
Japanese: japanese, ja
Portuguese: portuguese, pt
Russian: russian, ru
Chinese: chinese, zh
Arabic: arabic, ar
Multi: multi
When mkvtoolnix is installed:
- Updates video title
- Sets preferred audio track (based on config)
- Sets preferred subtitle track (forced only by default)
Example:
File: movie.mkv with tracks:
- Audio 1: English
- Audio 2: French
- Audio 3: German
- Subtitle 1: English
- Subtitle 2: French (forced)
Config: PREFERRED_AUDIO_LANG = "fr"
Result: French audio & French forced subtitles set as default
Input: big.buck.bunny.2008.1080p.h264.mkv
Output: Big Buck Bunny - 1080P.mkv
Path: /destination/Movie/Big Buck Bunny - 1080P.mkv
Input: sintel.s01e01.french.720p.web.mkv
Output: Sintel S01E01 - FRENCH - 720P.mkv
Path: /destination/Serie/Sintel/S01/Sintel S01E01 - FRENCH - 720P.mkv
Input: elephants.dream.2006.4k.bluray.mkv
Output: Elephants Dream - 4K.mkv
Path: /destination/Movie/Elephants Dream - 4K.mkv
Input: spring.1x05.1080p.mkv
Output: Spring S01E05 - 1080P.mkv
Path: /destination/Serie/Spring/S01/Spring S01E05 - 1080P.mkv
Input: /Downloads/subfolder/nested/movie.mkv
Output: Movie - 1080P.mkv
Path: /destination/Movie/Movie - 1080P.mkv
# Ubuntu/Debian
sudo apt install mkvtoolnix
# macOS
brew install mkvtoolnixEnsure you have read/write permissions on source and destination folders.
Check that:
-
File extensions match supported formats
-
Files are not empty (size > 0)
-
Source path is correct in
config/constants.go -
RECURSIVE_SCANis set appropriately