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.
-
You can hash local video using
videohash.from_path("<absolute path to video>"). -
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 are calculating image hashes under the hood.
License
Released under the MIT License. See license for details.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file videohash-1.0.1.tar.gz.
File metadata
- Download URL: videohash-1.0.1.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33336e4a870c2c89962b80560f6612db49523d784410b8612253bd1e2da81e82
|
|
| MD5 |
e4b8cd89d8960b9affe768732e3968e5
|
|
| BLAKE2b-256 |
f22fb25cb1bb0bb155ba6e1fffcd494dee5e1849a9256d0e3f06396f1317611b
|
File details
Details for the file videohash-1.0.1-py3-none-any.whl.
File metadata
- Download URL: videohash-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17fc786dd9a2314a3d3004411ba7dfaa6864d3de81df630f6c5abfe50d5956f5
|
|
| MD5 |
a6529e9dff929059cc0ae07750344d2f
|
|
| BLAKE2b-256 |
241d0a10fe180dc62bb220f45adac1af53aedca139c121eb938b47f6bc639e40
|