Incorrectly arranged images in the timeline
Here the copy-paste from #immich :
I did a fresh restart with v1.80 two days ago. Yesterday I updated to v1.81 and added a external library with digitalized pictures.
Most of them are displayed correctly on the timeline. But some of them aren't:

53 Replies
But when I look at the details of this snow-person picture, the correct date is given:

Here the Windows Explorer metadata from this file:

And here as json from MediaInfo:
{
"creatingLibrary": {
"name": "MediaInfoLib",
"version": "22.09",
"url": "https://mediaarea.net/MediaInfo"
},
"media": {
"@ref": "N:\XXX\1999.01B\TIFF Files\Image_0013.tif",
"track": [
{
"@type": "General",
"ImageCount": "1",
"FileExtension": "tif",
"Format": "TIFF",
"FileSize": "124619176",
"File_Created_Date": "UTC 2023-09-26 19:01:40.000",
"File_Created_Date_Local": "2023-09-26 21:01:40.000",
"File_Modified_Date": "UTC 2023-09-26 19:01:40.000",
"File_Modified_Date_Local": "2023-09-26 21:01:40.000",
"Encoded_Application_CompanyName": "Nikon",
"Encoded_Application_Name": "VueScan 9 x64 (9.5.81)",
"Encoded_Library_Name": "LS-5000"
},
{
"@type": "Image",
"Format": "Raw",
"Format_Settings_Endianness": "Little",
"Width": "3683",
"Height": "5637",
"ColorSpace": "RGB",
"BitDepth": "16",
"Compression_Mode": "Lossless",
"Encoded_Date": "1999:01:01 02:13:20",
"extra": {
"Density_X": "4000.000",
"Density_Y": "4000.000",
"Density_Unit": "dpi"
}
}
]
}
}
Here an image that is correctly arranged:


Thanks for sharing the metadata! This indeed appears to be a regression caused by https://github.com/immich-app/immich/pull/4072 and a weird way of your camera creating the image/adding metadata. Somehow metadata extraction gets the wrong value for localDateTime, causing the discrepancy. Maybe @etnoy or @jrasm91 can have a look at it? I don't really understand timezones lol. They are just weird to me
Metadata via MediaInfo:
{
"creatingLibrary": {
"name": "MediaInfoLib",
"version": "22.09",
"url": "https://mediaarea.net/MediaInfo"
},
"media": {
"@ref": "N:\XXX\2007.02\TIFF Files\Image_0015.tif",
"track": [
{
"@type": "General",
"ImageCount": "1",
"FileExtension": "tif",
"Format": "TIFF",
"FileSize": "125205990",
"File_Created_Date": "UTC 2023-09-26 19:10:52.000",
"File_Created_Date_Local": "2023-09-26 21:10:52.000",
"File_Modified_Date": "UTC 2023-09-26 19:10:52.000",
"File_Modified_Date_Local": "2023-09-26 21:10:52.000",
"Encoded_Application_CompanyName": "Nikon",
"Encoded_Application_Name": "VueScan 9 x64 (9.5.81)",
"Encoded_Library_Name": "LS-5000"
},
{
"@type": "Image",
"Format": "Raw",
"Format_Settings_Endianness": "Little",
"Width": "5620",
"Height": "3712",
"ColorSpace": "RGB",
"BitDepth": "16",
"Compression_Mode": "Lossless",
"Encoded_Date": "2007:01:01 02:19:56",
"extra": {
"Density_X": "4000.000",
"Density_Y": "4000.000",
"Density_Unit": "dpi"
}
}
]
}
}
This one works?
Yup.
It's literally the same
(metadata-wise)
Could you try re-generating all metadata? Administration settings -> jobs
but are you on a release version, or on the latest git version?
I digitalized these pictures some years ago using a Nikon Scanner and VueScan.
Last week I used Lightroom to set the more or less correct date on all those pictures.
Currently I am on v1.81.0 via truecharts:
https://github.com/truecharts/charts/pull/13237
Gonna do that 🙂
in that case please ignore our pull request since it was merged tonight, it's not part of any release yet
Ah you mean PR #4072? ok!
yep
I'm assuming you always added the metadata in the exact same way, correct?
can you show an exiftool dump of the metadata?
there are several different types of fields, xmp, iptc, exif...they can have different values especially since it was initially scanned and then modified
Yes
Ok, I did Refresh Metadata on those specific images and now they're correctly sorted!
depending on the program used etc etc. timestamps are a minefield
But why didn't it worked in the first place?
Apparently though immich is resilient enough to get it working. I'm actually impressed!
can do that if it still helps, give me some minutes.
Yeah that's a good question. Tbh it could in theory be even a caching issue.
You mean from my browser?
I checked it on two different PCs and on my mobile..
Hm. Thing is if metadata extraction would have failed on those images, the side panel would be incorrect as well. Maybe it died midst extracting exif stuff though
Ok, here is the exiftool dump:
Are there any errors in the microservices log when you run metadata extract for this image?
no, I don't see any errors. But I didn't checked the logs back then when I initially imported those images yesterday.
refreshing metadata doesn't output anything, regenerating thumbnails seems to work without any issues:
2023-10-05 12:53:20.362271+00:00[32m[Nest] 8 - [39m10/05/2023, 2:53:20 PM [32m LOG[39m [38;5;3m[MediaService] [39m[32mSuccessfully generated JPEG image thumbnail for asset 6254c9c4-92b3-41cd-9ef3-788f01413b87[39m
2023-10-05 12:53:21.790082+00:00[32m[Nest] 8 - [39m10/05/2023, 2:53:21 PM [32m LOG[39m [38;5;3m[MediaService] [39m[32mSuccessfully generated WEBP image thumbnail for asset 6254c9c4-92b3-41cd-9ef3-788f01413b87[39m
is 1999-01-01 the expected date?
my Log Level is set to log, though.
So not that verbose...
Should be enough for errors though
1999-01-01 is set in Date Created in exif
yup.
and 2017:08:23 23:48:08 is the date I digitalized this image...

did you run "refresh metadata" on the asset?
Turns out re-generating metadata on the affected images fixed it. So the question is why it didn't work in the first place
three dots menu -> refresh metadata
That's when I set the correct "Date taken" with Lightroom last week.
initially it'll just read the file creation date
As mentioned above: That fixed it. But why not in the first place?
I mean the correct "date taken" was somehow extracted since the beginning. But the timeline didn't displayed them correnctly...
then when you extract metadata it does the (complex and slow) process of parsing all exif
so this is expected behavior
it'll be a little wonky until extracted metadata
but you're right, we should use the same data everywhere, that's more of a bug
When uploading it doesn't do metadata extraction? what?
not immediately
Yeah of course, but the job gets scheduled?
yes
And that job was done
I had 0 pending jobs.
hm...as you say, it should have imported it correctly right away
did you import a lot of photos at once?
maybe there was some error initially
Yes, kind of. Around 5.3k
But all of them are digitalized pictures with 100MB+ filesize:

nice. I have a lot of scanned photos I haven't yet imported to i mmich
was this an issue with only this asset, or many other assets?
Its pretty nice to see all those memories on immich 😄
No, there were a lot more. like e.g. 20-40 more
I have a lot of very old images I've digitized that I know the date to within +/- 10 years so setting dates will be hard
I'm thinking about developing a browse by folder option for immich to make them usable
ufff.
I just used the beginning of the year when they were taken....
that would be amazing indeed!