Skip to main content

GuessIt - a library for guessing information from video files.

Project description

Guessit

https://secure.travis-ci.org/wackou/guessit.png?branch=master

GuessIt is a python library that tries to extract as much information as possible from a video file.

It has a very powerful filename matcher that allows to guess a lot of metadata from a video using only its filename. This matcher works with both movies and tv shows episodes.

For example, GuessIt can do the following:

$ python guessit.py "Treme.1x03.Right.Place,.Wrong.Time.HDTV.XviD-NoTV.avi"
For: Treme.1x03.Right.Place,.Wrong.Time.HDTV.XviD-NoTV.avi
GuessIt found: {
    [1.00] "mimetype": "video/x-msvideo",
    [0.80] "episodeNumber": 3,
    [0.80] "videoCodec": "XviD",
    [1.00] "container": "avi",
    [1.00] "format": "HDTV",
    [0.70] "series": "Treme",
    [0.50] "title": "Right Place, Wrong Time",
    [0.80] "releaseGroup": "NoTV",
    [0.80] "season": 1,
    [1.00] "type": "episode"
}

Features

At the moment, the filename matcher is able to recognize the following property types:

[ title,                             # for movies and episodes
  series, season, episodeNumber,     # for episodes only
  date, year,                        # 'date' instance of datetime.date
  language, subtitleLanguage,        # instances of guessit.Language
  container, format,
  videoCodec, audioCodec,
  audioChannels, screenSize,
  releaseGroup, website,
  cdNumber, cdNumberTotal,
  filmNumber, filmSeries,
  bonusNumber, edition, other
  ]

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.

Install

Installing GuessIt is simple with pip:

$ pip install guessit

or, with easy_install:

$ easy_install guessit

But, you really shouldn’t do that.

Support

The project website for GuessIt is hosted at ReadTheDocs. There you will also find the User guide and Developer documentation.

This project is hosted on GitHub: https://github.com/wackou/guessit

Please report issues via the bug tracker.

Contribute

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

  1. 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.
  2. Fork the repository on Github to start making your changes to the master branch (or branch off of it).
  3. Write a test which shows that the bug was fixed or that the feature works as expected.
  4. Send a pull request and bug the maintainer until it gets merged and published. :)

License

GuessIt is licensed under the LGPLv3 license.

News

0.5.4

Release date: 11-Feb-2013

  • guessit can be installed as a system wide script (thanks @dplarson)
  • Enhanced logging facilities
  • Fixes for episode number and country detection

0.5.3

Release date: 1-Nov-2012

  • GuessIt can now optionally act as a wrapper around the ‘guess-language’ python module, and thus provide detection of the natural language in which a body of text is written
  • Lots of fixes everywhere, mostly for properties and release group detection

0.5.2

Release date: 2-Oct-2012

  • Much improved auto-detection of filetype
  • Fixed some issues with the detection of release groups

0.5.1

Release date: 23-Sep-2012

  • now detects ‘country’ property; also detect ‘year’ property for series
  • more patterns and bugfixes

0.5

Release date: 29-Jul-2012

  • Python3 compatibility
  • the usual assortment of bugfixes

0.4.2

Release date: 19-May-2012

  • added Language.tmdb language code property for TheMovieDB
  • added ability to recognize list of episodes
  • bugfixes for Language.__nonzero__ and episode regexps

0.4.1

Release date: 12-May-2012

  • bugfixes for unicode, paths on Windows, autodetection, and language issues

0.4

Release date: 28-Apr-2012

  • much improved language detection, now also detect language variants
  • supports more video filetypes (thanks to Rob McMullen)

0.3.1

Release date: 15-Mar-2012

  • fixed package installation from PyPI
  • better imports for the transformations (thanks Diaoul!)
  • some small language fixes

0.3

Release date: 12-Mar-2012

  • fix to recognize 1080p format (thanks to Jonathan Lauwers)

0.3b2

Release date: 2-Mar-2012

  • fixed the package installation

0.3b1

Release date: 1-Mar-2012

  • refactored quite a bit, code is much cleaner now
  • fixed quite a few tests
  • re-vamped the documentation, wrote some more

0.2

Release date: 27-May-2011

  • new parser/matcher completely replaced the old one
  • quite a few more unittests and fixes

0.2b1

Release date: 20-May-2011

  • brand new parser/matcher that is much more flexible and powerful
  • lots of cleaning and a bunch of unittests

0.1

Release date: 10-May-2011

  • fixed a few minor issues & heuristics

0.1b2

Release date: 12-Mar-2011

  • Added PyPI trove classifiers
  • fixed version number in setup.py

0.1b1

Release date: 12-Mar-2011

  • first pre-release version; imported from Smewt with a few enhancements already in there.

Project details


Release history Release notifications

History Node

2.1.4

History Node

2.1.3

History Node

2.1.2

History Node

2.1.1

History Node

2.1.0

History Node

2.0.5

History Node

2.0.4

History Node

2.0.3

History Node

2.0.1

History Node

2.0.0

History Node

2.0rc8

History Node

2.0rc7

History Node

2.0rc6

History Node

2.0rc5

History Node

2.0rc4

History Node

2.0rc3

History Node

2.0rc2

History Node

2.0rc1

History Node

2.0b4

History Node

2.0b3

History Node

2.0b2

History Node

2.0b1

History Node

2.0a4

History Node

2.0a3

History Node

2.0a2

History Node

2.0a1

History Node

1.0.3

History Node

1.0.2

History Node

1.0.0

History Node

0.11.0

History Node

0.10.4

History Node

0.10.3

History Node

0.10.2

History Node

0.10.1

History Node

0.10.0

History Node

0.9.4

History Node

0.9.3

History Node

0.9.2

History Node

0.9.1

History Node

0.9.0

History Node

0.8

History Node

0.7.1

History Node

0.7

History Node

0.6.2

History Node

0.6.1

History Node

0.6

This version
History Node

0.6b1

History Node

0.5.4

History Node

0.5.3

History Node

0.5.2

History Node

0.5.1

History Node

0.5

History Node

0.4.2

History Node

0.4.1

History Node

0.4

History Node

0.4-dev

History Node

0.3.1

History Node

0.3

History Node

0.3b2

History Node

0.3b1

History Node

0.2

History Node

0.2b1

History Node

0.1

History Node

0.1b2

History Node

0.1-dev

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
guessit-0.6b1.tar.gz (63.6 kB) Copy SHA256 hash SHA256 Source None May 6, 2013

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page