vpdq Python Binding
This is a Python binding library to the vPDQ (video PDQ) hashing algorithm by Meta.
It is written in Cython.
Development is hosted on GitHub.
Windows is currently not supported by the Cython bindings.
Installation
Install from PyPI
python -m pip install vpdq --upgrade
OR
Install locally (run from root vpdq folder):
python -m pip install -e .
You should now be able to run python -c "import vpdq" without error.
Usage
import vpdq
# A vpdq hash is a list of vpdqFeatures.
#
# Each vpdqFeature has five attributes:
# quality: int
# frame_number: int
# hash: Hash256 (Video frame hashed by PDQ)
# hex: str (64 digit hex string representation of hash)
# timestamp: double
vpdqFeatures = vpdq.computeHash("my_video.mp4")
for feature in vpdqFeatures:
print(f"{feature.frame_number},{feature.hex},{feature.quality},{feature.timestamp}")
Sample Output:
0,e271017837246aaccddea259648fb7d62f435c89d9e99b2497763e216c8d055c,100,0
1,c0f11178372c6aaccddea259648fbfd62f434c89c9e99b249772be216c8d055c,98,1
2,c0f10b78372c6aacc5dea25b748fb7d22f434c89c9a9db249772b6216c8d855c,80,2
3,c0f00b7837247aaccddea25b128fb7d22f434c894da9cb349776b621668dc55c,100,3
...
Development
See CONTRIBUTING.md for development instructions.
Metadata
Release files for vpdq 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| vpdq-0.2.5.tar.gz | 671.2 kB | Without provenance | Details |
Release files / vpdq-0.2.5.tar.gz
| Download URL | vpdq-0.2.5.tar.gz |
|---|---|
| Size | 671.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c4a8765209b46a545f151859257aa1f725db194c3669da8affea13c8b9a5aca
|
|
BLAKE2b-256 checksum How to use checksums |
f702cd0f72ce6946f95840bf888cc07083c67ca7b5cea2b225a4c4e158d58869
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for vpdq 0.2.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.