Skip to content

Instantly share code, notes, and snippets.

@jauling
Last active April 4, 2021 13:50
Show Gist options
  • Select an option

  • Save jauling/b25483195e380637c93e374dc9d826b7 to your computer and use it in GitHub Desktop.

Select an option

Save jauling/b25483195e380637c93e374dc9d826b7 to your computer and use it in GitHub Desktop.
EXIFTOOL for Google Photos
Apologies for the lack of formatting here, I'll clean it up soon I swear.
I often take framegrabs from my action camera videos and then upload them to Google Photos. I want to be able to set
tags that track: timestamp, basic camera info, and GPS.
I haven't found a tool that automatically sets timestamps based on the original video (then increment based on video
position) so I do this manually. I had problems with free UI based EXIF editors that do not populating tags that
Google Photos can read. After a bit of trial and error, I found the appropriate tags that seem to work. Google Photos
seems to really like XMP tags.
All commands below tested with exiftool 11.25.
# Show all time/date related tags
exiftool -a -G1 -s -time:all FILENAME
# Show gps related tags (doesn't show you XMP GPS though!)
exiftool -a -gps:all FILENAME
# Sets XMP:CreateDate, then set all other dates with that value
# Note: both commands are necessary, since you can't set a tag value then copy it to other tags in one go (read the FAQ!)
exiftool -a -XMP:CreateDate="YYYY:MM:DD HH:mm:ss" FILENAME
exiftool -a "-AllDates<XMP:CreateDate" FILENAME
# Set camera make and model, MUST also set -XMP:FNumber
exiftool -XMP:Make="GITUP" -XMP:Model="GIT2" -XMP:FNumber=2.8 FILENAME
# Set XMP GPS coordinates using decimal format, then chuck it into EXIF
exiftool -XMP:GPSLatitude="36.916389" -XMP:GPSLongitude="-4.750000" FILENAME
exiftool "-all>gps:all" FILENAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment