simulot / immich-go

An alternative to the immich-CLI command that doesn't depend on nodejs installation. It tries its best for importing google photos takeout archives.
GNU Affero General Public License v3.0
1.18k stars 35 forks source link

Use google photos JSON content to set immich metadata #329

Open m1ndy opened 5 days ago

m1ndy commented 5 days ago

Hi,

I've been scouring the readme and Github in general searching for a project that parses Takeout archives and transfers as much info of their .json sidecar files back into the media item's exif or database (like in case of immich)

Can we have a table of this sorts filled and added to the readme? JSON bit Photos Videos
Edited Geolocation coordinates Imported into EXIF for format X, Y, Z Imported into abc, for formats xyz. Not imported for formats m,n,o.
Text Description added to photo ..
Rotation Information ..
Face Cluster Information
Edited Capture date/time
'Uploaded from' device info
Upload date/time
simulot commented 5 days ago

It's not as simple.

Immich-go upload images without touching them, and immich process them as it wants. The date of capture that comes from the JSON

The rest comes from the EXIF data or is ignored.

simulot commented 2 days ago

A section of the readme describes how dates are determined.

m1ndy commented 2 days ago

Sorry, does immich-go not fetch edited location data and other bits from Takeout's JSON?

The only bit it captures from the JSON is capture date?!

That answers that table, then, no? Just add the table and list every row as 'no', 'no', 'no', etc

simulot commented 2 days ago

The problem is how to pass the information to Immich.

The upload API (https://immich.app/docs/api/upload-asset) accept only a field named fileCreatedAt used by Immich-go to set the date of the capture. There is an API endpoint to update the coordinates and the description (https://immich.app/docs/api/update-asset). Immediately after the upload, the photos are placed in a server process queues for extracting the metadata.

The server extract GPS, camera model, date of capture, lens, ISO, detect faces, etc. I don't know how this process behave on just updated photos. I suspect that any information present in EXIF overrides what has been updated previously.

The face detection would suppose there is a way to match them with the immich persons. Any other piece is not used.

simulot commented 2 days ago

I'm discussing with the immich team on possibilities. The most promising is to build a sidecar file with missing part on the go.