hvdvpdq


Namehvdvpdq JSON
Version 0.0.13 PyPI version JSON
download
home_page
SummaryPython bindings for Facebook VPDQ hash fixed
upload_time2023-07-05 21:57:40
maintainer
docs_urlNone
authorFacebook
requires_python
licenseBSD
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # vpdq
This is a Python binding library to the vPDQ (video PDQ) hashing algorithm by Meta. The project is at [github](https://github.com/facebook/ThreatExchange/tree/main/vpdq)

## Installation
### Install library
```
pip install vpdq
```
### Install FFmpeg

Before using VPDQ to create hashes, you must install FFmpeg. FFmpeg is easiest to use if accessible via the `$PATH` environment variable.

There are a variety of ways to install FFmpeg, such as the [official download links](https://ffmpeg.org/download.html), or using your package manager of choice (e.g. `sudo apt install ffmpeg` on Debian/Ubuntu, `brew install ffmpeg` on OS X, etc.).

Regardless of how FFmpeg is installed, you can check if your environment path is set correctly by running the `ffmpeg` command from the terminal, as in the following example (truncated for brevity):

```
$ ffmpeg
ffmpeg version 4.4.2 Copyright (c) 2000-2021 the FFmpeg developers
```

> **Note**: The actual version information displayed here may vary from one system to another; but if a message such as `ffmpeg: command not found` appears instead of the version information, FFmpeg is not properly installed.

### Usage
```
import vpdq
vpdqHashes = vpdq.computeHash("file_path")
# Each hash have five attributes
# quality: int
# frame_number: int
# hash: list
# hex: str (64 digits hex string representation of hash)
# timestamp: double
for hash in vpdqHashes:
    print(str(hash.frame_number) + "," + hash.hex + "," + str(hash.quality) + "," + str(hash.timestamp))
```
Sample Output:
```
0,e271017837246aaccddea259648fb7d62f435c89d9e99b2497763e216c8d055c,100,0
1,c0f11178372c6aaccddea259648fbfd62f434c89c9e99b249772be216c8d055c,98,1
2,c0f10b78372c6aacc5dea25b748fb7d22f434c89c9a9db249772b6216c8d855c,80,2
3,c0f00b7837247aaccddea25b128fb7d22f434c894da9cb349776b621668dc55c,100,3
....
```
            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "hvdvpdq",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Facebook",
    "author_email": "threatexchange@fb.com",
    "download_url": "https://files.pythonhosted.org/packages/32/eb/9f89e261de36afc3db6cb0732ab63ee87a3fd56941a6a5b749913cac5a73/hvdvpdq-0.0.13.tar.gz",
    "platform": null,
    "description": "# vpdq\nThis is a Python binding library to the vPDQ (video PDQ) hashing algorithm by Meta. The project is at [github](https://github.com/facebook/ThreatExchange/tree/main/vpdq)\n\n## Installation\n### Install library\n```\npip install vpdq\n```\n### Install FFmpeg\n\nBefore using VPDQ to create hashes, you must install FFmpeg. FFmpeg is easiest to use if accessible via the `$PATH` environment variable.\n\nThere are a variety of ways to install FFmpeg, such as the [official download links](https://ffmpeg.org/download.html), or using your package manager of choice (e.g. `sudo apt install ffmpeg` on Debian/Ubuntu, `brew install ffmpeg` on OS X, etc.).\n\nRegardless of how FFmpeg is installed, you can check if your environment path is set correctly by running the `ffmpeg` command from the terminal, as in the following example (truncated for brevity):\n\n```\n$ ffmpeg\nffmpeg version 4.4.2 Copyright (c) 2000-2021 the FFmpeg developers\n```\n\n> **Note**: The actual version information displayed here may vary from one system to another; but if a message such as `ffmpeg: command not found` appears instead of the version information, FFmpeg is not properly installed.\n\n### Usage\n```\nimport vpdq\nvpdqHashes = vpdq.computeHash(\"file_path\")\n# Each hash have five attributes\n# quality: int\n# frame_number: int\n# hash: list\n# hex: str (64 digits hex string representation of hash)\n# timestamp: double\nfor hash in vpdqHashes:\n    print(str(hash.frame_number) + \",\" + hash.hex + \",\" + str(hash.quality) + \",\" + str(hash.timestamp))\n```\nSample Output:\n```\n0,e271017837246aaccddea259648fb7d62f435c89d9e99b2497763e216c8d055c,100,0\n1,c0f11178372c6aaccddea259648fbfd62f434c89c9e99b249772be216c8d055c,98,1\n2,c0f10b78372c6aacc5dea25b748fb7d22f434c89c9a9db249772b6216c8d855c,80,2\n3,c0f00b7837247aaccddea25b128fb7d22f434c894da9cb349776b621668dc55c,100,3\n....\n```",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Python bindings for Facebook VPDQ hash fixed",
    "version": "0.0.13",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "32eb9f89e261de36afc3db6cb0732ab63ee87a3fd56941a6a5b749913cac5a73",
                "md5": "752815dbd33aac2a55c23516316c8d8b",
                "sha256": "b170fd52c713f8bded887a4cf340e03c793ca6ecfcc5186590357d61eba6e7de"
            },
            "downloads": -1,
            "filename": "hvdvpdq-0.0.13.tar.gz",
            "has_sig": false,
            "md5_digest": "752815dbd33aac2a55c23516316c8d8b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 103629,
            "upload_time": "2023-07-05T21:57:40",
            "upload_time_iso_8601": "2023-07-05T21:57:40.404078Z",
            "url": "https://files.pythonhosted.org/packages/32/eb/9f89e261de36afc3db6cb0732ab63ee87a3fd56941a6a5b749913cac5a73/hvdvpdq-0.0.13.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-05 21:57:40",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "hvdvpdq"
}
        
Elapsed time: 2.17352s