Metadata Cleaner is a powerful CLI tool that removes, edits, and views metadata in:
- Images: JPG, PNG, TIFF, WEBP
- Documents: PDF, DOCX, TXT
- Audio: MP3, WAV, FLAC
- Videos: MP4, MKV, AVI
It features:
- ✅ Batch processing for multiple files.
- 🔄 Recursive folder scanning.
- ⚡ Parallel execution for performance.
- 📜 Selective metadata filtering.
- 📊 Detailed logging & error handling.
git clone https://github.com/sandy-sp/metadata-cleaner.git
cd metadata-cleaner
poetry install
poetry run metadata-cleaner --helppip install metadata-cleaner
metadata-cleaner --helpThis project uses a generic manage.py script for development tasks (compatible with Linux, Mac, and Windows).
# Check deps & Install packages
python3 manage.py installpython3 manage.py test# Lint code
python3 manage.py lint
# Security audit
python3 manage.py check
# Clean artifacts
python3 manage.py cleanmetadata-cleaner view sample.jpgExample Output:
{
"Make": "Canon",
"Model": "EOS 80D",
"DateTimeOriginal": "2023:01:20 14:22:35"
}metadata-cleaner delete sample.jpg# Process a folder recursively
metadata-cleaner delete ./my_photos --dry-run
# Remove dry-run to apply changes
metadata-cleaner delete ./my_photosFeatures:
- 📂 Recursively finds all supported files (Images, Docs, Video).
- 🧬 Lossless Video: Preserves all video/audio streams via copy (no re-encoding).
- 🐛 Dry Run: Use
--dry-runto see what would happen.
You can run Metadata Cleaner without installing dependencies using Docker.
docker build -t metadata-cleaner .Map your local data folder to /data in the container.
# Clean a directory
docker run --rm -v $(pwd)/photos:/data metadata-cleaner delete /data
# View metadata
docker run --rm -v $(pwd)/sample.jpg:/file.jpg metadata-cleaner view /file.jpg- Log File:
logs/metadata_cleaner.log - Set Debug Mode:
METADATA_CLEANER_LOG_LEVEL=DEBUG metadata-cleaner delete sample.jpg
- Fork the repository.
- Create a new branch (
feature-branch). - Submit a pull request.