-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Exiftool: Set QuickTimeUTC flag for fixing time zone of videos #1388
Comments
Cab you provide us with example files for testing? Time zones are not really standardized in metadata. We calculate it based on the GPS data if any. |
Here is the full output of video metadata. These discrepancies happen with both my Samsung phones.
|
I can confirm the same issue with videos I took with my OnePlus device. I think I noticed this issue also with videos I took with an older Canon camera. |
@dror3go Testfiles can be send to hello@photoprism.app :) @zahaecelac we will have a closer look next week |
Thanks for providing those samples! While the file names show about the same create time (15:33 vs 15:40), the
When there is no time zone, this typically means it's the local time since there is no convention (which is a shortcoming of the standard). This makes sense as not all photos / videos have GPS data. If it would be UTC by default, you wouldn't know the local time later. The JPEG additionally contains a |
I'll go ahead and close this as we've received no more feedback. |
Hi! Should we expect a fix for videos where dates contain explicit timezone? |
It's something that should be fixed in your phone or camera as its use of the created date field seems inconsistent, see above. Probably best we can do is release the batch edit feature so that you can manually fix it - or have the money to manually maintain a list of problematic devices to fix their metadata. You may also look into existing Exif tools to update your video metadata and then reindex. |
@lastzero I've checked with iPhone X, Samsung S7, Samsung A5, and OnePlus 7T - all with the same timezone issue. So it's not an obscured bug. What about using exiftool's
See here for the documentation. |
Interesting, does this add a timezone automatically? Need to be careful, can't change the behavior with every release or depending on the Exiftool version. |
From what I know, it's an Android specialty and may also depends on the OS version. |
I'm not an exiftool expert, but I've checked also with a video taken with iPhone X iOS 14.6:
Same with Samsung A5 Android 8.0. I came across some old forum threads about this topic: |
Found this on https://askubuntu.com/questions/989646/exif-tool-and-video-files-which-are-saved-with-utc-timestamps 👇
So basically as expected. May then be fixed for you, and broken for others. Need a camera model lookup table to get it right for everyone. Worst we can do is changing the behavior with every release. |
If it's an issue of "fix for some, broken to others" - shouldn't PhotoPrism aim to have it fixed for the majority of users? I'm not saying that my case is the same as for most users, but the quote you pasted states that UTC is the Quicktime standard in this case. BTW, what about cross checking the timezone using GPS tags when available? |
If you knew how often we changed things back and forth already 😂 Impossible for us to know at development time who the majority is. We'll work something out, but after having the time to think about it and perform testing. Thank you very much for looking this up in the Exiftool docs / forum! 🤗 |
This also enables large file support to read metadata from movie length video files.
Added the Exiftool flag as requested, and started a new preview build: https://drone.photoprism.app/photoprism/photoprism/1456 Let us know if this works for you! |
Had to tweak Exiftool parameters to make it work, and started a new preview build for testing: https://drone.photoprism.app/photoprism/photoprism/1468 The new Docker image should be available within the next hour, unless the build fails and needs to be restarted (check link above). |
As it turns out, the |
Was just about to try the preview build and test this. So if I took a video in timezone |
As it turned out, the exiftool -api QuickTimeUTC parameter converts CreateDate to local time using the server's time zone. This doesn't help as it's technically still a local time and not UTC. Had to implement this manually in our Exiftool JSON parser for MP4 videos only.
With this fix, MP4 and Quicktime video create dates will be explicitly stored as UTC if their metadata doesn't contain a specific time zone. Other video metadata needs to include an explicit time offset or will be assumed to be in local time. I'm starting a new preview build which should be available within the next one or two hours. Check our build server for this: |
Development preview and https://demo.photoprism.org/ have been updated. Feedback welcome! |
Hey @lastzero, sorry for the late reply - I struggled setting up a preview image alongside a latest image, I ended up using SQLite for that. Plus, I wanted to gather some relevant an irrelevant videos to test this. Anyway - this seems to be working great! |
Excellent, thanks for testing! Another user tested for us as well, so we thought this is working and I closed the issue. Live photos are somewhat special in that there are "official" Apple LivePhotos and short videos we just classify as "live" so that you can hover with the mouse to watch them. The last case shouldn't result in other metadata as it's handled directly in the Exiftool JSON parser before the classification as "live" happens. Can you provide us with live photos to debug the issue? Either attached to this issue, or send them to hello@photoprism.app if private. |
My bad - the timezone seems to be correct. I guess I was too fast to jump into conclusion. |
When I import video files (mp4) from my phone they got assigned wrong time. Photos made at the same moment are treated properly.
Example:
A photo and a video were shot at 14:51 EDT. Imported photo has correct 14:51 EDT timestamp. Imported video got 18:51 EDT.
If I check source video file with
mediainfo
tool, it shows 18:51 UTC.It looks like import ignores timezone metadata from video.
The text was updated successfully, but these errors were encountered: