Media Metadata Extraction Tool
Extract metadata from your photos and videos with ease! 🎯
This repository contains a bash script for extracting metadata from media files:
- 🖼️ Images: JPG, JPEG, PNG
- 🎥 Videos: MOV, MP4
- 📅 Extracts creation date/time
- 🌍 Extracts GPS coordinates (when available)
- 📊 Generates detailed reports in a
reports
directory - ⚡ Shows processing time and statistics
- 🎯 Identifies files with valid GPS data
- 📁 Handles both images and videos in a single pass
The script requires exiftool
to be installed on your system.
Ubuntu/Debian
sudo apt-get update
sudo apt-get install exiftool
MacOS (Homebrew)
brew install exiftool
Other Unix Systems
Visit the ExifTool website for installation instructions.
./extract_metadata.sh [input_directory]
If no input directory is specified, the current directory will be used.
The script will:
- 📁 Create a
reports
directory if it doesn't exist - 📝 Generate a report file with timestamp (e.g.,
media_metadata_20240101_120000.txt
) - 🌍 Include a summary of files with GPS data
- 📊 List detailed metadata for each processed file
- 📈 Show processing statistics
Each report includes:
- 🗺️ Files with GPS coordinates (summary)
- 📝 Detailed metadata for each file
- 🔢 Total number of files processed
- 🌍 Number of files with GPS data
- ⏱️ Processing time
- 🕒 Timestamp of report generation
- ✅ The script handles errors gracefully and will notify if ExifTool is not installed
- 🌐 GPS coordinates of (0,0) are treated as invalid and marked as "Not available"
- 🔄 All reports are timestamped to prevent overwriting