Skip to main content

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

The MKV Episode Matcher is a tool for identifying TV series episodes from MKV files and renaming the files accordingly.

Quick start

To use the MKV Episode Matcher, follow these steps:

  1. Clone this repository git clone https://github.com/Jsakkos/mkv-episode-matcher
  2. Obtain an API key from TMDb (https://developers.themoviedb.org/authentication/getting-a-apikey).
  3. (Optional) - Obtain an API key from Opensubtitles.com by creating an API consumer (https://www.opensubtitles.com/en/consumers)
  4. Provide a filepath to your show directory. This is the main directory that contains all of the episodes for a specific show. The directory and subfolders must be arranged in the following structure:
  • Show name
    • Season 1
    • Season 2
    • ...
    • Season n
  1. Call python __main__.py with the TMDB_API_KEY and SHOW_DIR as arguments or in environment variables from your command line:
python __main__.py --api-key `your-api-key` --show-dir /path/to/show

How it works

MKV Episode Matcher compares reference images from TMDb with frames from the mkv content using image hashing.

Caveats (WIP)

Currently, MKV Episode Matcher is slow (several minutes per episode), CPU intensive, and error-prone.

Known issues

When reading BluRay files, the following warning pops up in the terminal:

Could not find codec parameters for stream 3 (Subtitle: hdmv_pgs_subtitle (pgssub)): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options

Contributing

Contributions are welcome! If you would like to contribute to the MKV Episode Matcher project, please follow these steps:

  1. Fork the repository.
  2. Clone the repository.
  3. Create a new branch for your contribution.
  4. Make your changes and commit them to your branch.
  5. Push your branch to your forked repository.
  6. Open a pull request to the main repository.

Please ensure that your code follows the project's coding conventions and standards. Additionally, provide a clear and detailed description of your changes in the pull request.

Thank you for your contribution!

License

MIT License

Copyright (c) 2024 Jonathan Sakkos

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Acknowledgments

This product uses the TMDB API but is not endorsed or certified by TMDB. The Movie DB Logo

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mkv_episode_matcher-0.1.0.tar.gz (9.5 MB view details)

Uploaded Source

Built Distributions

mkv_episode_matcher-0.1.0-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

mkv_episode_matcher-0.1.0-py2.py3-none-any.whl (15.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file mkv_episode_matcher-0.1.0.tar.gz.

File metadata

  • Download URL: mkv_episode_matcher-0.1.0.tar.gz
  • Upload date:
  • Size: 9.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for mkv_episode_matcher-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b5f287b6dd2df943813b651bdaa4d39d291e54eb9a6a2f09a129f67719b36573
MD5 b6e454feeadd0f1da3e481a51ee39b45
BLAKE2b-256 3f00c94c4998483dbb26a17f13fad2d9d542f1456a6e1d34ec221ea7128764b9

See more details on using hashes here.

File details

Details for the file mkv_episode_matcher-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mkv_episode_matcher-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 030675149914b9e84abd9b99b529f800ce5ba01a78c23db146875249ac5afcea
MD5 8c751f3adc66dd3efda83cb83499c82f
BLAKE2b-256 b0e4f20b92ee828cf1fb26c453a98022f3db1ca35a10725861df5d5b326993a5

See more details on using hashes here.

File details

Details for the file mkv_episode_matcher-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for mkv_episode_matcher-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5a5277b7ec027a01509567b94b70f7e5e3c432790b0099c08cdb345743e768d2
MD5 91450b7e24db2465fcef97cf418d5ccc
BLAKE2b-256 ad9546670e2cf5485259a827bb6ec8dcedc3e61acdcecd5518b4ffbc9121f42c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page