Skip to main content

Video Hashing Library

Project description


A simple Video Hashing Library

Build Status Build Status codecov pypi Downloads GitHub lastest commit PyPI - Python Version


You must have ffmpeg installed to use this library.

Install FFmpeg

  • APT
sudo apt install ffmpeg
  • Snap
sudo snap install ffmpeg
brew install ffmpeg

Install videohash

pip install videohash
  • Install directly from GitHub:
pip install git+


>>> import videohash
>>> hash1 = videohash.from_url("")
>>> str(hash1)
>>> hash2 = videohash.from_url("")
>>> str(hash2)
>>> diff = hash1 - hash2
>>> diff
>>> hash3 = videohash.from_url("")
>>> diff = hash1 - hash3
>>> diff
>>> str(hash3)
>>> #hash4 file is hash1 file downloaded locally. Use absolute path
>>> hash4 = videohash.from_path("/home/akamhy/Downloads/rocket.webm")
>>> diff = hash4 - hash1
>>> diff

You can change the algorithm used to generate the hash of the collage via the image_hash argument. The default algorithm is average_hash.

>>> hash = videohash.from_url("", image_hash="crop_resistant_hash")
>>> hash = videohash.from_path("/home/akamhy/Downloads/rocket.webm", image_hash="phash")
Algorithms supported

  • average_hash
  • phash
  • dhash
  • whash
  • colorhash
  • crop_resistant_hash

videohash uses to use these hashing algorithms.


License: MIT

NASA videos are in the public domain. NASA copyright policy states that "NASA material is not protected by copyright unless noted".

Released under the MIT License. See license for details.

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

videohash-1.0.2.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

videohash-1.0.2-py3-none-any.whl (6.0 kB view hashes)

Uploaded Python 3

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