Skip to content
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

Search: Sort results also considering sequence numbers #4175

Open
seanwalter opened this issue Apr 14, 2024 · 5 comments
Open

Search: Sort results also considering sequence numbers #4175

seanwalter opened this issue Apr 14, 2024 · 5 comments
Labels
idea Feedback wanted / feature request

Comments

@seanwalter
Copy link

With many cameras now taking photos at many frames per second, it would be good for PhotoPrism to use the complete EXIF time stamp information when sorting oldest first or newest first. At the moment, it seems like PhotoPrism gets this backwards, or possibly orders photos randomly when the EXIF data shows them taken within the same second.

For example, I have a series of photos where Exiftool reports the time stamps as follows:

  • File Creation Date/Time: 2024:03:21 09:33:28-07:00
  • File Creation Date/Time: 2024:03:21 09:33:28-08:00
  • File Creation Date/Time: 2024:03:21 09:33:28-09:00

If sorting oldest to newest, these files should appear in the above order. However, they actually appear in the opposite order.

@seanwalter seanwalter added the idea Feedback wanted / feature request label Apr 14, 2024
@lastzero
Copy link
Member

From what I see, the additional information included in the timestamps is the time zone offset and not the sub-second time (which may also be available, but not in your examples)?

@lastzero lastzero changed the title When sorting chronologically, use complete EXIF time stamp information Search: Sort results also considering sub-second time information Apr 16, 2024
@seanwalter
Copy link
Author

Hmmm… maybe my camera is using time zone information as a hack. I’ll look back into it.

In any case, an alternative would be to sort on time stamp as the first sort key and file name as a second sort key. In most situations cameras are naming image files sequentially, so time stamp + file name would likely solve for this in nearly all cases.

Exceptions would be when files with equivalent time stamps have been manually renamed (file owner should be understanding of this not working) or when the camera’s default file numbering “rolls over” from something like xxx9999.ext to xxx0000.ext, which will happen rarely.

@lastzero
Copy link
Member

Files of the same type should generally be added in the order of their file names, so that the import time is equivalent to it. However, without looking it up in our code, I'm not 100% sure what resolution it has...

@lastzero
Copy link
Member

If available, the sub second time is also extracted and indexed. Again, I'm on my phone and currently can't look into details as to where and how exactly this is used.

@seanwalter
Copy link
Author

It looks like at least on my camera there is not subsecond information, but there are a few "Sequence Number" fields for images taken in a rapid burst such as the situations I am concerned about.

The fields are: Sequence Number, Sequence Image Number and Sequence File Number. In all cases I have checked, these numbers are identical within a given image file, and vary with each image in the burst sequence. The first image is given a 1 for each of these fields, the second a 2 and so on.

That said, based on how I read the EXIF documents on the exiftool web site, these tags may not be universally used. When available, using these or similar tags from other cameras would be the cleanest way to sort chronologically if subsecond information is not available in the time stamp.

However, it might be simpler just to assume people generally upload their images with the sequential file naming defaults from their cameras, and use file name as a secondary sort key when there is a "tie" in sorting based on EXIF time stamp -- per my earlier comment.

Ultimately, it's your application so I trust you will prioritize and/or solve this (or not...) in whatever way makes the most sense within the ongoing development roadmap. Thank you for looking into it.

@graciousgrey graciousgrey changed the title Search: Sort results also considering sub-second time information Search: Sort results also considering sequence numbers May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea Feedback wanted / feature request
Projects
Status: Ideas 💭
Development

No branches or pull requests

2 participants