Skip to content

Instantly share code, notes, and snippets.

@SaiNikhileshReddy
Last active September 24, 2023 07:58
Show Gist options
  • Save SaiNikhileshReddy/46d18dc5a106821daa1438cee41c1212 to your computer and use it in GitHub Desktop.
Save SaiNikhileshReddy/46d18dc5a106821daa1438cee41c1212 to your computer and use it in GitHub Desktop.
Google Photos Takeout - iCloud Photos - Image Metadata Transfer - JSON Metadata to JPG - EXIF(tool)

Follow the steps to transfer the JSON metadata to JPG/MP4

  1. First move all the uncompressed files you have downloaded to a common folder

    $ rsync -av --ignore-existing source_folder/ destination_folder/
  2. Download the source code of exiftool or git clone it

    $ git clone https://github.com/exiftool/exiftool
  3. Google Takeout does produce another json file for images which were edited and made a copyof. If you wish to keep a copy but not update the date then the following command is optional

    $ rm -rf *-edited.jpg
  4. Update the exiftool & "Google Photos" path according to your needs

    ./<path_to_exiftool>/exiftool -d %s -tagsfromfile %d%f.%e.json \
    "-Keywords<Tags" \
    "-Subject<Tags" \
    "-Caption-Abstract<Description" \
    "-ImageDescription<Description" \
    "-DateTimeOriginal<PhotoTakenTimeTimestamp" \
    "-FileCreateDate<PhotoTakenTimeTimestamp" \
    "-FileModifyDate<PhotoTakenTimeTimestamp" \
    "-GPSAltitude<GeoDataAltitude" \
    "-GPSLatitude<GeoDataLatitude" \
    "-GPSLatitudeRef<GeoDataLatitude" \
    "-GPSLongitude<GeoDataLongitude" \
    "-GPSLongitudeRef<GeoDataLongitude" \
    -overwrite_original -ext mp4 -ext jpg -r "Google Photos"
  5. For further assistance, you can reach out to the references I have used

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment