Closed alextran1502 closed 9 months ago
Between when this PR was merged and 23.2.0 was released it looks like the order of these tags was changed.
From what I understand, more or less all videos have CreateDate
. Some apple videos specifically have CreationDate
, which should take precedence over CreateDate
, but it is now later in the list, so it'll never be used.
Is there a reason you changed the order?
I pushed SubSec values to the front as they (sometimes, not always) have higher precision. The “demoting” of CreationDate wasn’t on purpose (I mistakenly assumed he added it in alphabetic order).
I actually don’t recommend simply returning the first defined value. I had to make PhotoStructure use additional heuristics (including precision-invariant sorting) to get the proper captured-at time. More details are here: https://photostructure.com/faq/captured-at/
As the list of tags is given to the function, and this const is simply the default, and there’s an order you prefer, perhaps use your own array? I’ll “demote” CreateDate later today.
OK. No worries, we can definitely use our own order. I was just curious if there was a specific reason for the change.
Applying additional heuristics and fallbacks is definitely a good idea. What you have on the FAQ is a good list/order - thanks for the link. Using firstDateTime
seems to work pretty well for so far, and it is better than the one or two tags we had before.
Perhaps you can contribute to Immich a better "captured at" implementation in the future :smile:
From what I understand, more or less all videos have CreateDate
Are you getting FileCreateDate
(from stat()
) mixed up with CreateDate
?
CreateDate
is indeed found in many .mp4
, but I'm not seeing it in the 10+ other movie exemplar types I've collected.
No, I'm talking specifically about Quicktime:CreateDate. You are probably more familiar with the space than I am. The videos I have been working with are mostly phone/camera videos, most of which are mp4s with a CreateDate
field.
Of the other movie types you've collected, do any of them have both CreateDate
and CreationDate
? Or, what is the common tag you use to captured at?
what is the common tag you use to captured at
Every camera manufacturer loves to be different, and no one follows the standards.
Lol, great. I'm sure we'll run into more edge cases soon enough :-).
I found the issue that the method
firstDateTime
doesn't consider the file's creation date. So, it causes an issue for this file, which has theCreationDate
is the actual file's created date and theCreateDate
is the file's modified datesample.zip