Remove metadata from images and videos recursively
Project description
assets-metadata-remover
A command-line tool to read and remove metadata from images and videos recursively. Generates clean copies in an output folder that mirrors the original structure. Original files are never modified.
Features
- Read metadata — Display metadata from images and videos in table or JSON format
- Remove metadata — Strip all metadata (EXIF, XMP, IPTC, GPS, etc.) from files
- Removal reports — Show detailed tables of what metadata was removed from each file
- Recursive processing — Process entire directory trees while preserving folder structure
- Safety first — Original files are never modified; always writes to separate output folder
- Graceful degradation — Continues processing even if some tools are missing
Installation
With pipx (recommended)
pipx install assets-metadata-remover
With pip
pip install assets-metadata-remover
System dependencies
- exiftool — required for image processing
- ffmpeg — required for video processing
macOS:
brew install exiftool ffmpeg
Ubuntu/Debian:
sudo apt-get install libimage-exiftool-perl ffmpeg
Fedora:
sudo dnf install perl-Image-ExifTool ffmpeg
If a tool is missing, the script detects it at startup and processes only the files it can handle, showing a clear warning.
Quick start
# Read metadata from a photo
assets-metadata-remover read ~/photo.jpg
# Remove metadata from a directory
assets-metadata-remover clean ~/Photos
# Show what was removed
assets-metadata-remover clean ~/Photos --report
Commands
read — Display metadata
Display metadata from images and videos in a human-readable table or JSON format.
assets-metadata-remover read <path> [--json]
Options:
--json— Output as JSON (useful for scripting)
Examples:
Read metadata from a single file:
$ assets-metadata-remover read ~/photo.jpg
File: /Users/you/photo.jpg
┌─────────────────────┬──────────────────────────────┐
│ Key │ Value │
├─────────────────────┼──────────────────────────────┤
│ Make │ Canon │
│ Model │ Canon EOS 5D Mark IV │
│ DateTimeOriginal │ 2024:03:15 14:23:45 │
│ GPSLatitude │ 40 deg 42' 46.08" N │
│ GPSLongitude │ 74 deg 0' 21.60" W │
└─────────────────────┴──────────────────────────────┘
Read metadata from a directory:
assets-metadata-remover read ~/Photos
Output as JSON for programmatic use:
assets-metadata-remover read ~/Photos --json | jq '.[] | select(.metadata.GPSLatitude)'
clean — Remove metadata
Remove all metadata from images and videos, creating clean copies in an output folder.
assets-metadata-remover clean <path> [options]
Options:
-o, --output DIR— Output directory (default:<input>_clean)--dry-run— Simulate without writing files-v, --verbose— Show per-file logging--verify— Re-inspect copies and report residual metadata--report— Show table of metadata removed from each file
Examples:
Process a directory with custom output:
assets-metadata-remover clean ~/Photos -o ~/Photos_clean
Simulate without writing (dry run):
assets-metadata-remover clean ~/Photos --dry-run
Show metadata removal report:
$ assets-metadata-remover clean ~/Photos --report
/Users/you/Photos/vacation.jpg
Metadata removed:
┌─────────────────────┬──────────────────────────────┐
│ Key │ Removed Value │
├─────────────────────┼──────────────────────────────┤
│ Make │ Canon │
│ Model │ Canon EOS 5D Mark IV │
│ GPSLatitude │ 40 deg 42' 46.08" N │
│ GPSLongitude │ 74 deg 0' 21.60" W │
│ DateTimeOriginal │ 2024:03:15 14:23:45 │
└─────────────────────┴──────────────────────────────┘
✔ Images cleaned: 1
✔ Videos cleaned: 0
⏭ Skipped: 0
✖ Errors: 0
📊 Total metadata fields removed: 5
📁 Output: /Users/you/Photos_clean
Verbose mode with verification:
assets-metadata-remover clean ~/Photos -v --verify
Process a single file:
assets-metadata-remover clean ~/photo.jpg -o ~/clean/
Supported formats
Images: JPG, JPEG, PNG, TIFF, TIF, WebP, HEIC, HEIF, GIF, BMP
Videos: MP4, MOV, MKV, AVI, M4V, WebM, WMV, FLV, 3GP
Extension comparison is case-insensitive (.JPG and .jpg are equivalent).
Safety
Original files are never modified. The script always writes to a separate output folder.
- The
cleancommand creates copies in<input>_clean/by default - Use
-oto specify a custom output directory - Use
--dry-runto preview what would be processed without writing files - Directory symlinks are not followed to avoid infinite loops
Limitations
- Videos are copied without re-encoding (
-c copy), which is fast and lossless, but some exotic formats may not be compatible with the output container - Some metadata embedded in proprietary formats may not be fully removed by
exiftool - Reading metadata before cleaning (with
--reportor-v) doubles the number of tool calls per file
Development
Setup
git clone https://github.com/synapsync/assets-metadata-remover.git
cd assets-metadata-remover
python -m venv .venv
source .venv/bin/activate
pip install -e .
Build and publish
make build # Build wheel and sdist
make publish # Upload to PyPI
make publish-test # Upload to TestPyPI
make test # Run smoke tests
License
MIT License. See LICENSE for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Changelog
v1.4.0 (2026-06-14)
- Improved README with badges, multi-platform installation, and real output examples
- Added comprehensive changelog
- Enhanced documentation with quick start guide
v1.3.0 (2026-06-14)
- Added
--reportflag tocleancommand to show metadata removal tables - Added total metadata fields removed count in summary
- Filter out
_originalbackup files from directory scans
v1.2.0 (2026-06-14)
- Added
readcommand to display metadata from files - Support for table and JSON output formats
- Graceful handling of missing tools
v1.1.0 (2026-06-14)
- Refactored to subcommand architecture (
readandclean) - Extracted shared utilities to separate module
v1.0.0 (2026-06-14)
- Initial release
- Remove metadata from images and videos recursively
- Support for exiftool and ffmpeg
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file assets_metadata_remover-1.4.0.tar.gz.
File metadata
- Download URL: assets_metadata_remover-1.4.0.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fad372dac05a23ed8c2b4e612cd3b3df82b11354d83543741028370db8e3a58b
|
|
| MD5 |
81ea7b991aa56b22298c34ea9d2b0c6e
|
|
| BLAKE2b-256 |
e98e0903d6206c1bfaed4474bf997fe7f306b36cbc6d16b6f47836bdbec8c594
|
File details
Details for the file assets_metadata_remover-1.4.0-py3-none-any.whl.
File metadata
- Download URL: assets_metadata_remover-1.4.0-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ae9bc6d38e438c4a2c9c98ba49908d04a2c14acef767bba64bc13e08956c9aa
|
|
| MD5 |
49d8e48c0699ec9010555b85331ddcb5
|
|
| BLAKE2b-256 |
1c0188ade520402a2b2f880d036433cbbb4a3160e190baf65ad53d734f30fa49
|