Skip to content

feat(server): parse EXIF creation time for some insta360 images #17564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 14, 2025

Conversation

Kirens
Copy link
Contributor

@Kirens Kirens commented Apr 12, 2025

Description

Some insta360 panoramas are not placed correctly in the timeline. This is because the creation date is stored in a metadata tag unknown to immich. It seems insta360 stores metadata in XMP GPano tags, with their own non-standard and undocumented addition SourceImageCreateTime.

The tag is already parsed by exiftool-vendored. By adding it to EXIF_DATE_TAGS it becomes a possible source of the creation date when processing image metadata.

We can find traces of this tag in their ios-SDK repo. There's also a commit to Panoramax GeoPic Tag Reader that adds support for this tag which may provide context, and another example image.

How Has This Been Tested?

  • npm test
  • Upload the image from example.zip to a fresh instance and ensure it's placed correctly in the timeline

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if applicable
  • I have no unrelated changes in the PR.
  • I have confirmed that any new dependencies are strictly necessary.
  • I have written tests for new code (if applicable)
  • I have followed naming conventions/patterns in the surrounding code
  • All code in src/services/ uses repositories implementations for database calls, filesystem operations, etc.
  • All code in src/repositories/ is pretty basic/simple and does not have any immich specific logic (that belongs in src/services/)

It seems insta360 stores metadata in XMP GPano tags, with their own
non-standard and undocumented addition `SourceImageCreateTime`. For some
pictures this is the only EXIF tag containing a creation time.
@Kirens Kirens force-pushed the feat/insta360-exif branch from 11e299e to edce04e Compare April 12, 2025 16:16
@Kirens
Copy link
Contributor Author

Kirens commented Apr 12, 2025

Thought I was safe having run npm run lint, but now the formatting is fixed as well.

@jrasm91 jrasm91 merged commit 7562088 into immich-app:main Apr 14, 2025
41 checks passed
@Kirens Kirens deleted the feat/insta360-exif branch April 14, 2025 14:35
savely-krasovsky pushed a commit to savely-krasovsky/immich that referenced this pull request Jun 8, 2025
…ch-app#17564)

It seems insta360 stores metadata in XMP GPano tags, with their own
non-standard and undocumented addition `SourceImageCreateTime`. For some
pictures this is the only EXIF tag containing a creation time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants