Filename matcher

The filename matcher is based on regular expressions and tree splitting to guess values from input filename.

It is able to find many properties, like title, year, series, episodeNumber, seasonNumber,
videoCodec, screenSize, language. Guessed values are cleaned up and given in a readable format
which may not match the raw filename.

Other features

GuessIt also allows you to compute a whole lof of hashes from a file,
namely all the ones you can find in the hashlib python module (md5,
sha1, …), but also the Media Player Classic hash that is used (amongst
others) by OpenSubtitles and SMPlayer, as well as the ed2k hash.

If you have the ‘guess-language’ python package installed, GuessIt can also
analyze a subtitle file’s contents and detect which language it is written in.

If you have the ‘enzyme’ python package installed, GuessIt can also detect the
properties from the actual video file metadata.

Usage

guessit can be use from command line:

$ guessit
Usage: guessit [options] file1 [file2...]
Options:
-h, --help show this help message and exit
-P SHOW_PROPERTY, --show-property=SHOW_PROPERTY
Display the value of a single property (title, series,
videoCodec, year, type ...)
Naming:
-t TYPE, --type=TYPE
The suggested file type: movie, episode. If undefined,
type will be guessed.
-n, --name-only Parse files as name only. Disable folder parsing,
extension parsing, and file content analysis.
-c, --split-camel Split camel case part of filename.
-Y, --date-year-first
If short date is found, consider the first digits as
the year.
-D, --date-day-first
If short date is found, consider the second digits as
the day.
-E, --episode-prefer-number
Guess "serie.213.avi" as the episodeNumber 213.
Without this option, it will be guessed as season 2,
episodeNumber 13
-L ALLOWED_LANGUAGES, --allowed-languages=ALLOWED_LANGUAGES
List of allowed languages. Separate languages codes
with ";"
-C ALLOWED_COUNTRIES, --allowed-countries=ALLOWED_COUNTRIES
List of allowed countries. Separate country codes with
";"
-S EXPECTED_SERIES, --expected-series=EXPECTED_SERIES
List of expected series to parse. Separate series
names with ";"
-T EXPECTED_TITLE, --expected-title=EXPECTED_TITLE
List of expected titles to parse. Separate title names
with ";"
-G EXPECTED_GROUP, --expected-group=EXPECTED_GROUP
List of expected groups to parse. Separate group names
with ";"
--disabled-transformers=DISABLED_TRANSFORMERS
List of transformers to disable. Separate transformers
names with ";"
Output:
-v, --verbose Display debug output
-a, --advanced Display advanced information for filename guesses, as
json output
-y, --yaml Display information for filename guesses as yaml
output (like unit-test)
-f INPUT_FILE, --input-file=INPUT_FILE
Read filenames from an input file.
-d, --demo Run a few builtin tests instead of analyzing a file
Information:
-p, --properties Display properties that can be guessed.
-V, --values Display property values that can be guessed.
-s, --transformers Display transformers that can be used.
--version Display the guessit version.
guessit.io:
-b, --bug Submit a wrong detection to the guessit.io service
Other features:
-i INFO, --info=INFO
The desired information type: filename, video,
hash_mpc or a hash from python's hashlib module, such
as hash_md5, hash_sha1, ...; or a list of any of them,
comma-separated

Contribute

GuessIt is under active development, and contributions are more than welcome!

Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
There is a Contributor Friendly tag for issues that should be ideal for people who are not very
familiar with the codebase yet.

Fork the repository on Github to start making your changes to the master
branch (or branch off of it).

Write a test which shows that the bug was fixed or that the feature works as expected.

Send a pull request and bug the maintainer until it gets merged and published. :)