Skip to main content

Video Duplicate

Tool to detect duplicate videos.

Install

Dependencies:

sudo apt install libchromaprint-tools

Python dependencies:

pip install pyacoustid videohash pillow

Usage

folders = [Path("data/dup"), Path("data/test")]
duplicates = load_probable_duplicate(folders, tolerance=2.0)
print(f"Found {len(duplicates)} duplicates")

for duplicate in duplicates:
    v1, v2 = duplicate
    if check_if_video_duplicate_quick_hash(v1, v2, size=1024 * 1024):
        # check if the first 1MB (size) has the same hash between the two videos
        print(f"{v1} & {v2} are duplicate.")
        continue

    # compare audio between the two video
    similarity = acoustic_compare_two_videos(v1, v2)
    if isinstance(similarity, str):
        print(f"error: {similarity}")
        continue

    if similarity > 0.9:
        print(f"{v1} & {v2} are duplicate.")
        continue
    elif similarity > 0.8:
        print(f"{v1} & {v2} are likely duplicate.")
        continue

    if check_if_duplicate_videos_phash(v1, v2):
        # best method but very long/computer intensive
        print(f"{v1} & {v2} are duplicate.")

    else:
        print(f"{v1} & {v2} are NOT duplicate.")

Metadata

Release files for video-duplicate 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for video-duplicate 1.0.0
File Size Uploaded
video_duplicate-1.0.0.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for video-duplicate 1.0.0
File Interpreter ABI Platform
video_duplicate-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.4 kB

Release files / video_duplicate-1.0.0.tar.gz

Download URL video_duplicate-1.0.0.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c6af8c0d42290aa419848cf5f5d1b0b2930416006b889e501eb70942dee78c4e
BLAKE2b-256 checksum
How to use checksums
05cd0c0283e2dcef93cfe807a489e54085e820c4f5d6d91a28d3938149c4da42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / video_duplicate-1.0.0-py3-none-any.whl

Download URL video_duplicate-1.0.0-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c541aa0c0cee0b5bbf0a0f0015f6d9c50bcd1be60e4cc19b41ed4d4a2f652866
BLAKE2b-256 checksum
How to use checksums
3c047c1c2a12503b58efdf8347373dce0920619ecf3e9bf889e36ffaf069c1d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page