A free and open-source tool to restore lost metadata (e.g., dates, GPS coordinates) to images and videos downloaded from Google Photos Takeout, optimized for Mac and Unix systems.
Designed as a cost-free alternative to MetadataFixer, this tool ensures your media files retain their original metadata effortlessly.
When you download images and videos from Google Photos Takeout, they lose important metadata, such as the date and the GPS coordinates where they were taken. This tool restores that information by matching it from the downloaded JSON files, ensuring your media files retain their original context.
This project is a fork of GooglePhotosMatcher, enhanced for seamless compatibility with Mac and Unix systems.
- Metadata Matching: Matches metadata (date, GPS coordinates) from JSON files to images/live photos/videos.
- Edited/Original Support: Supports edited and original versions of media files.
- Cross-Platform: Compatible with Mac and Unix systems.
- Free & Open-Source: Completely free and open-source.
Here are some screenshots showcasing the application in action:
-
Download your Google Photos media
Use Google Takeout to download your photos and JSON metadata. -
Clone this repository
Run the following command to download the source code:git clone https://github.com/mtmarco87/google-photos-matcher-mac-unix.git
-
Install Python 3 Install Python 3 on your system:
-
On macOS:
brew install python3
-
On Linux:
sudo apt-get install python3
-
-
Install ExifTool
Install ExifTool for metadata manipulation:-
On macOS:
brew install exiftool
-
On Linux:
sudo apt-get install exiftool
-
-
Install Python dependencies
From the project folder, run:pip install -r requirements.txt
-
Make the script executable
Grant execution permissions to therun.shscript:chmod +x run.sh
To match and fix your Google Photos metadata, execute the run.sh script from the project folder, targeting any Takeout folder containing JSON and media files.
./run.sh Takeout/Google\ Photos/Photos\ from\ 2025Matched images/videos will be on directory Matched inside the same path.
The script supports the following parameters:
-
target_folder
The path to the folder containing JSON and media files to process. -
edited_prefix(optional)
Specifies the suffix Google uses for edited images in your local language.- Default:
edited - Example values:
modificato(IT),editado(ES).
- Default:
-
convert_all_to_jpg(optional)
Whether to convert all EXIF-compatible image files (TIF, TIFF, JPEG, JPG) to JPG.- Default:
false - Possible values:
true,false.
- Default:
-
convert_if_needed(optional)
Whether to convert EXIF-compatible images to JPG if metadata editing fails.- Default:
true - Possible values:
true,false.
- Default:
./run.sh target_folder edited_prefix convert_all_to_jpg convert_if_neededGoogle Photos stores two versions of edited media:
- The edited version (stored in the
Matchedfolder). - The original version (stored in the
EditedRawfolder).
Some files may remain unmatched due to special characters in their names. To fix this:
-
Rename the file and its corresponding JSON to remove special characters.
Example: Rename%E&xample.jpgtoExample.jpgand%E&xample.jsontoExample.json. -
Open the JSON file and update the
titleattribute to match the new file name. -
Run the script again.
If you encounter issues during the matching process, you can debug the application by redirecting the output to a file for analysis:
./run.sh Takeout/Google\ Photos/Photos\ from\ 2025 > results.txt-
Review the
results.txtfile
Open the file in any text editor to check the output. -
Check for Successes and Errors
- Success: Look for
0 errorsat the bottom of the file. The number of successes should match the number of media files in your Takeout folder. - Errors: Search for lines containing
Errorfor details about any issues.
- Success: Look for
-
Analyze Logs
The application provides detailed logs for each file:- Image Exif updated: Creation date metadata was successfully added or updated.
- Image GPS Data added/updated: GPS data (latitude, longitude, altitude) was successfully added or updated.
- Warning: Image coordinates not settled: Indicates an issue with GPS data for an image.
- Video Exif updated: Creation date and GPS data were successfully added or updated for a video file (applied to
Apple- orAndroid-specific tags). - Warning: Video coordinates not settled: Indicates an issue with GPS data for a video.
- Warning: Fixed Exif: Non-standard EXIF tags were corrected (e.g.,
37121,37500,41728,41729).
Additional tools are available in the tools folder:
-
convert-vp9-to-mp4.sh
This script converts VP9-encoded videos (unsupported by some devices, such as Apple devices, but used automatically by Google sometimes) to H.264 MP4 format while preserving file creation/modification dates and GPS coordinates. This ensures that metadata integrity is maintained during the conversion process.-
Prerequisites:
brew install ffmpeg chmod +x ./tools/convert-vp9-to-mp4.sh
-
Usage:
./tools/convert-vp9-to-mp4.sh source_video_file converted_video_file
-
Features:
- Transcodes VP9 videos to H.264 MP4 format.
- Copies over all metadata, including GPS coordinates.
- Reapplies correct file creation and modification dates.
-
-
terabox-folder-compare.jsandfilecount.py
These tools help verify that all your Google Photos Takeout files have been uploaded to Terabox (since it does not provide a way to count files in a folder):-
filecount.py: Recursively counts files and folders in a local directory and outputs the structure in JSON format.- Usage:
python filecount.py target_folder
- Usage:
-
terabox-folder-compare.js: Compares the local folder structure (fromfilecount.py) with the file counts in Terabox by interacting with its web app APIs.- Usage:
Paste the script into your browser's developer tools console while logged into Terabox and follow the instructions in the script.
- Usage:
These tools ensure that your uploaded files match the original folder structure.
-
-
terabox-file-counter-fetch.js
This script counts the number of files in a Terabox folder, helping verify that all your Google Photos Takeout files have been uploaded correctly. It works by interacting with the Terabox web app's internal APIs.-
Usage:
Paste the script into your browser's developer tools console while logged into Terabox and follow the instructions in the script. -
Notes:
- The script may need adjustments if Terabox updates its APIs.
- An XHR-based variant is included for older browser compatibility.
-
- mtmarco87 - Author of this project.
- anderbggo - Author of the original Google Photos Matcher.
- Freepik - Icon creator.
If you find this project useful, consider supporting its development:
- ⭐ Star the repository to show your appreciation.
- 💬 Share feedback or suggestions by opening an issue.
- ☕ Buy me a coffee to support future updates and improvements.
- 🔵 BTC Address:
bc1qzy6e99pkeq00rsx8jptx93jv56s9ak2lz32e2d - 🟣 ETH Address:
0x38cf74ED056fF994342941372F8ffC5C45E6cF21
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.


