Video Hashing Library
Project description
VIDEOHASH
A simple Video Hashing Library.
Installation
You must have ffmpeg installed to use this library.
- Using pip:
pip install videohash
- Install directly from GitHub:
pip install git+https://github.com/akamhy/videohash.git
Usage
-
https://raw.githubusercontent.com/akamhy/videohash/main/assets/rocket.webm is copy of https://www.youtube.com/watch?v=PapBjpzRhnA, both of these files are about the Artemis program and SLS rocket.
-
https://www.youtube.com/watch?v=_T8cn2J13-4 is a completly different video also about the Artemis program.
>>> import videohash
>>> hash1 = videohash.from_url("https://raw.githubusercontent.com/akamhy/videohash/main/assets/rocket.webm")
>>> str(hash1)
'7c7e7ff9ffff0000'
>>> hash2 = videohash.from_url("https://www.youtube.com/watch?v=PapBjpzRhnA")
>>> str(hash2)
'fc7e7ffbffff0000'
>>>
>>> diff = hash1 - hash2
>>> diff
2
>>>
>>> hash3 = videohash.from_url("https://www.youtube.com/watch?v=_T8cn2J13-4")
>>> diff = hash1 - hash3
>>> diff
37
>>> str(hash3)
'3cffff0000000eff'
>>>
-
Notice that the difference of hash1 and hash2 is 2, but the difference between hash1 and hash3 is 37.
-
The difference of hash1 and hash2 is not 0 as the file in this repository is slightly modified.
-
Public domain files used. NASA copyright policy states that "NASA material is not protected by copyright unless noted".
-
We create collage of frames and actually were are performing image hashing under the hood.
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
Hashes for videohash-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7419e9c2d7c49993960b100a9b0ab103826ceded03aef9d371b29c585090ba16 |
|
MD5 | dabd2406f4b360a80705315bf4254472 |
|
BLAKE2b-256 | 39b49f182dc4e44cf1002a1f5b210e38cdbe1187c333e806980884cab1df00fe |