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