MKV Episode Matcher
Automatically match and rename your MKV TV episodes using The Movie Database (TMDb).
Features
- ๐ฏ Automatic Episode Matching: Uses TMDb to accurately identify episodes
- ๐ Subtitle Extraction: Extracts subtitles from MKV files
- ๐ OCR Support: Handles image-based subtitles
- ๐ Multi-threaded: Fast processing of multiple files
- โฌ๏ธ Subtitle Downloads: Integration with OpenSubtitles
- โจ Bulk Processing: Handle entire seasons at once
- ๐งช Dry Run Mode: Test changes before applying
Prerequisites
- Python 3.9 or higher
- FFmpeg installed and available in system PATH
- Tesseract OCR installed (required for image-based subtitle processing)
- TMDb API key
- OpenSubtitles account (optional, for subtitle downloads)
Quick Start
-
Install the package:
-
Run on your show directory:
Documentation
Full documentation is available at https://jsakkos.github.io/mkv-episode-matcher/
Directory Structure
MKV Episode Matcher expects your TV shows to be organized as follows:
Show Name/
โโโ Season 1/
โ โโโ episode1.mkv
โ โโโ episode2.mkv
โโโ Season 2/
โ โโโ episode1.mkv
โ โโโ episode2.mkv
Reference Subtitle File Structure
Subtitle files that are not automatically downloaded using the --get-subs
flag should be named as follows:
~/.mkv-episode-matcher/cache/data/Show Name/
โโโ Show Name - S01E01.srt
โโโ Show Name - S01E02.srt
โโโ ...
On Windows, the cache directory is located at C:\Users\{username}\.mkv-episode-matcher\cache\data\
Reference subtitle files should follow this naming pattern:
{show_name} - S{season:02d}E{episode:02d}.srt
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE
for more information.
Acknowledgments
- TMDb for their excellent API
- OpenSubtitles for subtitle integration
- All contributors who have helped improve this project