Utilities for handling images, short mp4s, and animated gifs. See SPEC.md for the full spec.
Recursively scans a directory and reports files with identical content, grouped by MD5 hash. Files are first grouped by size, then hashed, to avoid hashing unique-sized files.
python3 find_duplicates.py <path>
Example:
$ python3 find_duplicates.py ~/Videos/library
~/Videos/library/big-tits/mp4/file1.mp4
~/Videos/library/bimbos/mp4/file1.mp4
1 duplicate group(s), 1 redundant file(s).
Requires Python 3. No external dependencies.
Recursively scans a directory for .gif files, checks each one's real content via
magic bytes (not its extension), and fixes mislabeled files in place:
- Actually WebP → transcoded to a real, highest-quality GIF (ffmpeg two-pass
palette generation + dithering), saved as
.gif. ffmpeg has no animated-WebP decoder, so Pillow decodes frames/timing first; ffmpeg does the quantization. - Actually MP4 → renamed to
.mp4, bytes untouched (already valid, just mislabeled — no re-encoding). - Actually GIF → left alone.
python3 convert_gif_wrappers.py <path> [--dry-run]
Requires Python 3, ffmpeg on PATH, and Pillow (python3-pil).