garzj / google-photos-migrate

A tool to fix EXIF data and recover filenames from a Google Photos takeout, preserving albums within the directory structure.
https://npmjs.com/package/google-photos-migrate
MIT License
104 stars 11 forks source link

EXIF Metadata other than DateTimeOriginal #20

Closed middiu closed 8 months ago

middiu commented 8 months ago

Hello there,

I was wondering if this tool takes care only of DateTimeOriginal metadata or if it fixes all the other metadata present in the JSON files.

I was doing some researches and it seems it is possible to fix GPS, Description and Tags metadata with the exittool options below.

I believe it shouldn't be too hard to implement these option here (if they are not implemented yet :) )

this is the link to the original article: https://legault.me/post/correctly-migrate-away-from-google-photos-to-icloud

exiftool -r -d %s -tagsfromfile "%d/%F.json" "-GPSAltitude<GeoDataAltitude" "-GPSLatitude<GeoDataLatitude" "-GPSLatitudeRef<GeoDataLatitude" "-GPSLongitude<GeoDataLongitude" "-GPSLongitudeRef<GeoDataLongitude" "-Keywords<Tags" "-Subject<Tags" "-Caption-Abstract<Description" "-ImageDescription<Description" "-DateTimeOriginal<PhotoTakenTimeTimestamp" -ext "*" -overwrite_original -progress --ext json <DirToProcess>

Thanks!

garzj commented 8 months ago

The tool only took care of several tags that populate DateTime values, so I added your tags. I'm a little surprised though as at least in my takeout, all GPS data from a json file was also preserved inside its file's metadata.

middiu commented 8 months ago

that's great mate, thanks a lot!