Skip to content
المشاريع

anderbggo/GooglePhotosMatcher

عرض على GitHub

حول

Google Photos metadata fixer

التصميم والوسائط

كيف تُقاس هذه الأرقام

النمو المقاس للنجوم

خلال 24 ساعة
٠
خلال 7 أيام
+٢
خلال 15 يومًا
+٤
خلال شهر
جارٍ جمع السجل

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

README.md

الأصل

Google Photos Matcher (v3.3)

Download for Windows (v3.3) | Release notes

Windows 64-bit. Portable: no installation, Python, or separate ExifTool setup required.

Simple tool to restore metadata (date, GPS coordinates, etc.) from Google Photos JSON files back into your original images and videos — just like MetadataFixer, but free and open source!

Google Photos Matcher v3.3 light interface
Dark mode and Spanish interface Google Photos Matcher v3.3 dark interface in Spanish

How it works 📖

When you download media from Google Photos via Takeout, the files lose important metadata such as the date taken and GPS coordinates. Google stores this data separately in .json sidecar files.

GPMatcher reads those JSONs and writes metadata directly into the original photos and videos. By default, successfully restored media are moved into a single flat MatchedMedia folder, while original versions of edited photos go into EditedRaw. Alternatively, enabling in-place mode preserves your entire folder structure: media files remain in their original year and album folders, metadata is merged directly into them, and no output folders are created. If two files share a name, the later one gets a number (photo(1).jpg). JSON sidecars are deleted after a successful restoration; failed or unmatched media and their JSON remain in their original folders.

Advanced options (collapsed under the folder field; the defaults are the recommended setup, and the link shows how many options are on):

  • Keep files in original folders (in-place): described above; remembered between sessions.
  • Merge Takeout parts into one folder (never remembered): when the selected folder contains several Takeout parts (Takeout, Takeout 2, takeout-...-001, or folders containing Google Photos), enabling it asks for confirmation and a folder name; on Match, the parts' files are moved into that combined folder before restoring so split years and albums are joined. Only useful together with in-place mode, since files split between parts are matched anyway. Nothing is overwritten: different files with the same name get a number and keep their JSON; identical duplicates stay in their original part. Preview never moves files.
  • Parallel processing (off by default): processes a few files at once, each worker with its own persistent ExifTool. The gain depends on the disk and antivirus.

Media and JSON split into same-named folders of different Takeout parts (e.g. Takeout/…/Photos from 2020 and Takeout 2/…/Photos from 2020) are matched automatically, and the activity log mentions when several parts are found. Guessing across unrelated folders only happens during Force match.

During Match, a matching-journal.csv in the output folder records every processed file as it happens, so progress is not lost if the app is closed unexpectedly.

Make a backup before using Match or Force match. There is no automatic copy or undo: if writing fails partway through, some metadata may already have changed. Force match may remove existing camera or lens metadata as a last resort. The app displays a confirmation before every Match or Force match run; Preview does not modify, move, or create anything in the selected folder (its report is saved in the system's temporary folder).

Matching uses both the JSON filename and its title, including numbered duplicates, supplemental metadata suffixes, case differences, Unicode normalization, edited versions, and recognizable Takeout truncation patterns. Ambiguous matches are reported instead of guessed.


Usage (EXE — no setup required) 🚀

  1. Download your Google Photos media from Google Takeout and extract the downloaded ZIP archives first. GPMatcher processes folders, not ZIP files.

  2. Download GPMatcher for Windows from Release v3.3 and double-click it to open. Everything needed is included; no configuration or compilation is required.

  3. Select the folder containing your images/videos and their JSONs (e.g. Photos from 2022 or the root Takeout folder)

    The app will automatically scan all subfolders

  4. Click Preview to inspect the matching plan without writing media, or Match to process it. Before Match starts, the app recommends a backup and asks for explicit confirmation. Cancel stops after the current file is completed.

  5. Restored media appear in MatchedMedia (or remain in their original subfolders when in-place mode is enabled); original versions of edited photos are stored in EditedRaw. JSON files for successful matches are deleted, not copied into the output. Failed media stay in their original folders with their JSON. Click Open results or Open report to inspect the output. The CSV report lists errors and failed Force match attempts, with the JSON, affected media, and cause. Failed Force match attempts count as unmatched but are included in the CSV. Successful matches, previews, skipped sidecars, and other unmatched media are omitted; the Matched, Errors and Unmatched counters still show the complete summary. If there are no reportable failures, the CSV contains its column headers only.

  6. If a Match run ends with errors or unmatched files, a Force match button appears. See Force match below.

Existing output files are never overwritten: name clashes get a numbered name, and a Live Photo or an edited/original pair receives the same number so the files still belong together. MatchedMedia and EditedRaw must be on the same filesystem as the original export so files can move without copying. ExifTool may still need temporary disk space to rewrite a file's internal metadata. Successfully moved files are excluded from subsequent runs.

ExifTool is kept open during each processing run so images, videos, and Live Photo checks reuse the same process instead of repeatedly loading its engine. It is closed when the run finishes or fails; operations still have a timeout and errors are checked individually. Metadata containing line breaks uses a separate invocation to preserve its content safely. Large videos can still be limited by disk speed and ExifTool's internal file rewriting.

Force match

The Force match button only appears after a normal Match run that ended with at least one error or unmatched file (not after Preview, a cancelled run, or a previous Force match). Clicking it shows a warning and asks for confirmation. It then retries the remaining files with riskier fixes that may lose some metadata:

  • Wrong extension: files whose content belongs to another format (for example, a PNG saved as .jpg) are renamed to their real extension.
  • Missing media: if exactly one unclaimed file has the JSON's name with a different extension (for example, the JSON says .HEIC but the file is .jpg), that file is used.
  • Missing media in another folder: if exactly one unclaimed file anywhere in the selected folder has the JSON's name, that file is used.
  • Invalid JSON values: invalid GPS coordinates or descriptions are discarded; the date is still restored.
  • Missing or damaged date: when the JSON has no valid date, or is empty or damaged, the capture date is taken from the file name (IMG_YYYYMMDD_HHMMSS, PXL_..., WhatsApp, Signal, Telegram, Snapchat...) or from the file itself. A damaged JSON that is not empty is kept, since it may still contain GPS or a description.
  • Live Photos: when only one half has a pairing identifier, it is copied to the other half. Identifiers are never invented.
  • Damaged metadata: ExifTool retries while ignoring minor errors, then rebuilds the file's metadata from what can still be read, and as a last resort removes the metadata already embedded in the file (camera, lens, etc.) before writing the Google Photos data. These steps run on a temporary copy; the original is replaced only if a step succeeds. Live Photos only get the first, non-destructive retry so their pairing identifier is kept.

Forced results are saved in MatchedMedia/ForcedMatches (and EditedRaw/ForcedMatches for originals of edited photos) so you can review them separately. Files that still fail stay in their original folder with their JSON, are counted as unmatched, and appear in the CSV report with a Force match failed: reason. MKV files, files without any usable date, and ambiguous matches cannot be forced.

Theme and language

Choose System, Light, or Dark from the theme selector, and System, English, or Español from the language selector. With System selected, the app detects the operating system's app theme and language at startup; Spanish is selected automatically on a Spanish-language system, and other languages use English.

Manual choices are remembered in your user profile. Theme and language can be changed without restarting the window or interrupting a restoration. Buttons provide hover, pressed, keyboard-focus, and disabled-state feedback. The activity log highlights successes and errors and translates common messages; filenames, metadata, and the CSV report's technical fields remain unchanged.


FAQs ❓

Windows or my antivirus says the file is unsafe

GPMatcher is open source and contains no malware, but the EXE is not digitally signed yet and is packaged with PyInstaller, which bundles Python and ExifTool into one self-extracting file. New, unsigned executables like this often trigger Windows SmartScreen ("Windows protected your PC") or heuristic antivirus detections (for example names ending in !ml), until enough people have downloaded them. Download it only from this repository's releases, then click More info → Run anyway. If your antivirus quarantines it, you can report it as a false positive to the antivirus vendor, or run it from the Python source instead.

What happens to edited photos?

If an edited image shares its JSON with the original, both versions receive the JSON's metadata: the edited version moves into MatchedMedia and the original moves into EditedRaw. For example, example-edited.png goes into MatchedMedia, while example.png goes into EditedRaw after both have been restored from the same JSON.

If the edited image has its own JSON, each version is restored using its own metadata and the same folder separation is preserved. Existing output files are never overwritten, and output folders are excluded from scanning.

Common edited-photo suffixes are detected automatically, including editado, editada, edited, modifié, and bearbeitet. No manual suffix setting is needed.

Why do some files stay unmatched?

Check the activity log and counters; the CSV lists errors and failed Force match attempts, not every unmatched file. Recognizable special characters and duplicate-name patterns are handled automatically. If several files are plausible, GPMatcher does not modify them. Missing media, conflicting sidecars, invalid timestamps/GPS, unsupported formats, and ExifTool errors are reported explicitly. Failed writes retain the original location and JSON, but may have partially updated metadata; restore from your backup if needed. Many of these cases can be retried with Force match.

Do the photos already contain metadata?

Often, yes. Photos taken with a camera or phone usually keep their original EXIF data (date, camera, and often GPS) inside the file. Screenshots, images saved from messaging apps or social networks, and downloaded pictures often have none. Dates or locations you changed inside Google Photos only exist in the JSON. GPMatcher writes the JSON's date, GPS, and description over the matching fields and keeps the rest of the embedded metadata, except when Force match has to remove it as a last resort.

Which formats are supported?

ExifTool is included in the standalone Windows build. It is still required separately when running the Python source or using an older, unbundled executable.

  • JPEG/JPG: restored with piexif, with ExifTool as a fallback for problematic EXIF. Apple MakerNotes use ExifTool to preserve Live Photo metadata.
  • HEIC/HEIF, PNG, WebP, TIFF/TIF, DNG, GIF, BMP, and RAW formats (CR2, NEF, ARW): require ExifTool.
  • MP4, MOV, 3GP, M4V, AVI, WMV: require ExifTool.
  • MKV: detected and reported, but not restored because ExifTool cannot write its metadata.

Capture timestamps are interpreted in the computer's local timezone. EXIF timezone offsets and QuickTime UTC conversion are updated consistently; Takeout does not always provide the original capture timezone.

What happens to Live Photos?

A companion MOV/MP4 without its own JSON is processed only when its Apple content identifier matches the image's existing identifier. Matching filenames alone are not enough. Identifiers are preserved and checked after writing; missing or conflicting identifiers are not automatically invented or overwritten. A video with its own JSON uses its own metadata. Compatibility with Apple Photos still needs validation on real exports in macOS.


For developers 🛠️

Prerequisites: Create a virtual environment at the root of the project first:

python -m venv venv
venv\Scripts\activate

Python 3.10 or newer is required. On macOS/Linux, activate with source venv/bin/activate; your Python installation must include Tkinter.

Option A — Build the .exe

  1. Install build dependencies:

    pip install -r "requirements-dev.txt"
    
  2. On 64-bit Windows, run:

    python files/build.py
    

The build downloads the official ExifTool 13.59 Windows distribution using Windows' curl.exe, verifies its pinned SHA-256 against the published checksum, checks its version, and embeds the complete portable runtime and original license files. Downloads are cached under build/exiftool; the application itself does not download anything.

For an offline build, supply the original ZIP instead:

python files/build.py --exiftool-archive "C:\Downloads\exiftool-13.59_64.zip"

The same checksum verification is required for offline archives.

dist/GPMatcher.exe is a single executable with ExifTool included. It appears without replacing an existing executable at the project root. Simply copying this EXE is enough for supported image/video formats; no adjacent ExifTool folder is needed. A Windows EXE does not run natively on macOS; macOS packaging must be built on macOS.

Running PyInstaller directly without the additional bundled resources creates an unbundled EXE. Use files/build.py for a standalone release.

ExifTool and its Windows/Perl runtime are third-party software with their own licenses. The original LICENSE, Licenses_Strawberry_Perl.zip, and readme files are retained inside the packaged resources. See the ExifTool source and Windows package information for upstream sources and terms.

Option B — Run without building

  1. Install runtime dependencies:

    pip install -r "requirements.txt"
    
  2. Install ExifTool for videos and image formats other than JPEG. Put it on your PATH or beside the source project so it can be detected automatically. On Windows, keep exiftool.exe and its exiftool_files folder together. This step applies to running the Python source, including macOS.

  3. Run:

    python files/window.py
    

    This entry point now works on both Windows and macOS. The previous macOS entry point is kept as an alias:

    python files/mac.py
    

Tests

The regression suite uses unittest, temporary exports, and real JPEG metadata writes. External tool failures and Live Photo identifiers are simulated so tests do not require ExifTool or modify personal files.

python -m unittest discover -s tests -v

Code layout

File Responsibility
files/window.py GUI entry point (Windows and macOS)
files/mac.py Legacy macOS alias for window.py
files/main.py Processing run: scanning, planning, restoring, Force match, CSV report
files/matching.py Pairing JSON sidecars with media files, real file type detection
files/metadata.py Writing dates, GPS and descriptions (piexif/ExifTool), Live Photo identifiers
files/exiftool_runner.py Locating ExifTool and running it through a persistent process (one per worker in parallel mode)
files/consolidator.py Detecting and merging multi-part Takeout folders
files/journal.py Live processing journal and detection of previous runs
files/governor.py Hardware summary, rough time estimate, and CPU-aware pacing of parallel runs
files/preferences.py Theme palettes, system theme/language detection, saved preferences
files/translations.py Interface texts and Spanish log translations
files/build.py Standalone Windows build with bundled ExifTool

Code signing policy

Free code signing provided by SignPath.io, certificate by SignPath Foundation.

  • Committers and reviewers: anderbggo. Pull requests from other contributors are reviewed by the maintainer before they are merged.
  • Approvers: anderbggo

Release executables are built from this repository by GitHub Actions and each signing request is approved manually. Signed releases are published once the SignPath Foundation application is approved; earlier releases are unsigned.

Privacy policy: This program will not transfer any information to other networked systems unless specifically requested by the user or the person installing or operating it. Photos and metadata are processed locally (including by the bundled ExifTool); only the About and Support buttons open web pages, and only when clicked.


License 📄

GPMatcher is released under the MIT License. The bundled ExifTool and its Perl runtime keep their own licenses, included with the executable.


Contributors ✒️

Buy me a coffee ☕

Buy me a coffee

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…