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.9k stars 55 forks source link

(0.23.0 Alpha) RAW file metadata #533

Closed nalsai closed 1 week ago

nalsai commented 1 week ago

When importing raw files using the latest alpha (v0.23.0-alpha5) of immich-go it doesn't detect the date from orf and rw2 files.

Exiftool and by extension immich are able to get the date from them. Therefore I would want either better date extraction in immich-go or the ability to disable it and let immich handle it.

Here are example files: https://send.bitwarden.com/#g9qT153smEirybIlAQLllw/73bvKQWALNv4ZZ3sNOIbSg Since they are too large, I can't attach them directly using GitHub. They are available for 30 days. I included the JPEG files for reference. They work correctly and the raw files should be imported with roughly the same data as their respective JPEG file.

simulot commented 1 week ago

I have downloaded your samples. Thanks a lot.

The panasonic has a tag Time Stamp that looks to be in UTC:

======== YG816412.jpg
Time Stamp                      : 2024:07:07 19:33:32
Date/Time Original              : 2024:07:08 04:33:32.561
======== YG816412.rw2
Time Stamp                      : 2024:07:07 19:33:32
Date/Time Original              : 2024:07:08 04:33:32

The Olympus has a tag Date Time UTC

======== YG816507.jpg
Date/Time Original              : 2024:07:08 04:35:07
Date Time UTC                   : 2024:07:07 19:37:07
======== YG816507.orf
Date/Time Original              : 2024:07:08 04:35:07
Date Time UTC                   : 2024:07:07 19:37:07

I have dropped your files directly on my Immich page. The server's TZ is UTC, my laptop is set of UTC+1. Here are the results:

When I set my TZ to UTC+0900, I get same results.

Therefore I would want either better date extraction in immich-go or the ability to disable it and let immich handle it.

The --capture-date-method=NONE let immich dealing with the dates. In that case, immich-go give the modification date of the file. This field is mandatory, and

With the last alpha version released, my laptop set on UTC+0900, with date extraction disabled:

The time comes from the file's date. The file date is a mandatory filed fir the upload. I have modified immich-go to give an empty date;

Quite good, isn't it?

I have re upload your files with my TZ set to Paris, and it still works. So, I don't see any reason to maintain the not so good code for extracting dates of capture before uploading.

nalsai commented 1 week ago

That's perfect, thank you!