Metadata-Version: 2.3
Name: video-duplicate
Version: 1.0.0
Summary: Find duplicate videos across folders
Author: ritonun
Author-email: ritonun <you@example.com>
Requires-Dist: pillow>=12.3.0
Requires-Dist: pyacoustid>=1.3.1
Requires-Dist: videohash>=3.0.1
Requires-Python: >=3.13
Description-Content-Type: text/markdown

# Video Duplicate

Tool to detect duplicate videos.

## Install
Dependencies:
```bash
sudo apt install libchromaprint-tools
```
Python dependencies:
```bash
pip install pyacoustid videohash pillow
```

## Usage
```python
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.")
```