Skip to content

Instantly share code, notes, and snippets.

@mm3509
mm3509 / dedup-iMovie-library.py
Last active March 19, 2021 03:10
When you import movies into iMovie 10 libraries, the file is always copied, wasting space and hindering editability. This script replaces the copy with a symlink, reclaiming disk space.
#!/usr/bin/env python3
#
# Usage: dedup-imovie-library.py LIBRARY ORIGINALS
#
# Public gist:
# https://gist.github.com/miguelmorin/92cd8b820fd0135bf0f7d5fea90dc3f1
#
# This code was inspired by this post and gist, and converted to Python
# https://benhollis.net/blog/2014/06/28/hard-linking-videos-to-save-space-in-your-imovie-library/
# https://gist.github.com/bhollis/6682c8b6b6357e2fedc5