A command-line utility for processing Google Takeout photo and video metadata and updating EXIF timestamps.
When you export your photos and videos from Google Photos using Google Takeout, you receive .supplemental-metadata.json files alongside your media files. These JSON files contain metadata including the original photo/video taken time. This tool automatically updates the EXIF/metadata of images and videos that lack timestamps using the information from these metadata files.
- Recursively searches directories for Google Takeout metadata files
- Supports both images and videos (JPG, PNG, MP4, MOV, AVI, MKV, M4V, 3GP, WebM, FLV, WMV)
- Parallel processing across all CPU cores for maximum performance
- Extracts photo/video timestamps from JSON metadata
- Checks existing EXIF/metadata to avoid overwriting
- Updates EXIF DateTimeOriginal, DateTime, and CreateDate fields
- For videos, also updates MediaCreateDate, TrackCreateDate, and related QuickTime tags
- Provides summary statistics after processing
- Rust toolchain (for building)
- exiftool must be installed on your system
Linux (Debian/Ubuntu):
sudo apt install libimage-exiftool-perlLinux (Fedora/RHEL):
sudo dnf install perl-Image-ExifToolmacOS:
brew install exiftoolOther systems: Download from exiftool.org
cargo build --releaseThe binary will be available at target/release/gtakeout
gtakeout <DIRECTORY>Where <DIRECTORY> is the path to your Google Takeout export folder.
# Process all photos in the Takeout directory
gtakeout ~/Downloads/Takeout
# Process a specific album
gtakeout ~/Downloads/Takeout/Google\ Photos/My\ AlbumThe tool will:
- Display which files are being updated
- Skip files that already have EXIF dates
- Report any errors encountered
- Show a summary of operations performed
Example output:
Searching for supplemental metadata files in: test
Updated: test/IMG-20161219-WA0000.jpg
Skipped (already has EXIF date): test/IMG-20200101-WA0001.jpg
Summary:
Metadata files found: 2
Images updated: 1
Errors: 0
- Scans directory recursively for
*.supplemental-metadata.jsonfiles - Collects all matching files into a list
- Processes all files in parallel using all available CPU cores
- For each metadata file, determines the corresponding image/video filename
- Detects file type (image or video) and checks for existing date metadata:
- For images: Uses fast native EXIF reader
- For videos: Uses exiftool to check QuickTime/MP4 date tags
- If no date exists, extracts
photoTakenTime.timestampfrom JSON - Converts Unix timestamp to EXIF datetime format (YYYY:MM:DD HH:MM:SS)
- Uses exiftool to write the timestamp with appropriate tags:
- For images: DateTimeOriginal, DateTime, CreateDate
- For videos: Also sets MediaCreateDate, MediaModifyDate, TrackCreateDate, TrackModifyDate
The application uses Rayon for parallel processing, which automatically distributes the workload across all available CPU cores. This provides significant performance improvements when processing large Google Takeout exports:
- On a quad-core system, expect up to 3-4x speedup compared to sequential processing
- On an 8-core system, expect up to 6-8x speedup
- Actual speedup depends on I/O performance and the speed of exiftool operations
- Original files are modified directly (exiftool uses
-overwrite_originalflag) - Only images without existing EXIF dates are modified
- Make a backup of your photos before running if you're concerned
This project is licensed under the WTFPL (Do What The Fuck You Want To Public License) - see the LICENSE file for details.
In short: You just DO WHAT THE FUCK YOU WANT TO.