The MKV Episode Matcher is a tool for identifying TV series episodes from MKV files and renaming the files accordingly.
Project description
MKV Episode Matcher
Automatically match and rename your MKV TV episodes using The Movie Database (TMDb).
Features
- 🎯 Automatic Episode Matching: Uses TMDb and OpenSubtitles to accurately identify episodes
- 🔊 Speech Recognition: Uses OpenAI Whisper for accurate episode identification
- ⬇️ Subtitle Downloads: Integration with OpenSubtitles
- ✨ Bulk Processing: Handle entire seasons at once
- 🧪 Dry Run Mode: Test changes before applying
Prerequisites
- Python 3.9-3.12
- FFmpeg installed and available in system PATH
- TMDb API key (optional, for subtitle downloads)
- OpenSubtitles account (optional, for subtitle downloads)
Quick Start
- Install the package:
pip install -U mkv-episode-matcher
- Run onboarding to set up your configuration (first-time users or to update credentials):
mkv-match --onboard
- You will be prompted for:
- TMDb API key (for episode matching)
- OpenSubtitles API key, Consumer Name, Username, and Password (for subtitle downloads)
- Show Directory (main directory of your show)
- If a config value already exists, you can accept the default or enter a new value.
-
a. If you setup the TMDb and Opensubtitles credentials above, automatically fetch subtitles with the
--get-subsflag. b. Alternatively, manually download .srt subtitles files to ~/.mkv-episode-matcher/cache/data/Show Name/ -
Run on your show directory:
mkv-match --show-dir "path/to/your/show"
Onboarding & Configuration
The onboarding process will prompt you for all required configuration values if you run with --onboard or if no config file exists. You can re-run onboarding at any time to update your credentials or show directory.
Required information:
- TMDb API key (for episode matching)
- OpenSubtitles API key (for subtitle downloads)
- OpenSubtitles Consumer Name (for subtitle downloads)
- OpenSubtitles Username (for subtitle downloads)
- OpenSubtitles Password (for subtitle downloads)
- Show Directory (main directory of your show)
If a value already exists, it will be shown as the default and you can accept it or enter a new value.
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
Documentation
Full documentation is available at https://jsakkos.github.io/mkv-episode-matcher/
Changelog
See CHANGELOG.md for a detailed list of changes.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mkv_episode_matcher-0.9.5.tar.gz.
File metadata
- Download URL: mkv_episode_matcher-0.9.5.tar.gz
- Upload date:
- Size: 162.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d996124eb8d80466030d01e2222fddd77fc171934296c8cde6ee9e897857eddd
|
|
| MD5 |
5056a614e022f4afe4cb9cd05fe7e42e
|
|
| BLAKE2b-256 |
f524f26560b8ce25bd2bc386c6a7332b1b5959aac671e1769ca289e634174228
|
Provenance
The following attestation bundles were made for mkv_episode_matcher-0.9.5.tar.gz:
Publisher:
python-publish.yml on Jsakkos/mkv-episode-matcher
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkv_episode_matcher-0.9.5.tar.gz -
Subject digest:
d996124eb8d80466030d01e2222fddd77fc171934296c8cde6ee9e897857eddd - Sigstore transparency entry: 479488154
- Sigstore integration time:
-
Permalink:
Jsakkos/mkv-episode-matcher@abb960f6d2ab814b8a39580fe827424fca4a9a78 -
Branch / Tag:
refs/tags/v0.9.5 - Owner: https://github.com/Jsakkos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@abb960f6d2ab814b8a39580fe827424fca4a9a78 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mkv_episode_matcher-0.9.5-py3-none-any.whl.
File metadata
- Download URL: mkv_episode_matcher-0.9.5-py3-none-any.whl
- Upload date:
- Size: 25.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b32c479194984d4802d4e0de8dfb6f61aff9b886c96fd7667fdcf6f27e916254
|
|
| MD5 |
8c7848ee62717b9ad2bea78cff44dafe
|
|
| BLAKE2b-256 |
d15dfa75dcbc1d9635c0f5d28b8b2c4a1c4cb7123fecf0d597f850d8edc35f20
|
Provenance
The following attestation bundles were made for mkv_episode_matcher-0.9.5-py3-none-any.whl:
Publisher:
python-publish.yml on Jsakkos/mkv-episode-matcher
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mkv_episode_matcher-0.9.5-py3-none-any.whl -
Subject digest:
b32c479194984d4802d4e0de8dfb6f61aff9b886c96fd7667fdcf6f27e916254 - Sigstore transparency entry: 479488164
- Sigstore integration time:
-
Permalink:
Jsakkos/mkv-episode-matcher@abb960f6d2ab814b8a39580fe827424fca4a9a78 -
Branch / Tag:
refs/tags/v0.9.5 - Owner: https://github.com/Jsakkos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@abb960f6d2ab814b8a39580fe827424fca4a9a78 -
Trigger Event:
push
-
Statement type: