Canon vids has good time & good timezone but display +1 hour in Photos

Started by Tonio, September 19, 2022, 04:55:13 PM

Previous topic - Next topic

Tonio

Hello everyone,

I create this new post because I don't see any reason for this to happen, and I've tried all I could to put these Canon videos at the right time but it doesn't display the time I see in metadata, in Photos macOS. It displays one more hour in Photos, even after setting all the dates to the right time. BUT the video sorts correctly with others in Photos: it is put at the right place, between two photos taken the same hour (so I have like: one photo 14:00, the video 15:30, and another photo 15:00).
What's even more stunning, is that the timezone for photos is correct everywhere (Reykjavik, Iceland) but this video displays Paris, France. I know videos are always UTC, but isn't there a way to make Photos understand that my video was taken in Iceland which is one hour less than Paris? And write in this video metadata the time zone as for the photos? In the metadata the dates are all 14:30:00!


Please have a look:
exiftool -a -G1 -time:all dir[System]        File Modification Date/Time     : 2017:12:26 15:24:32+01:00
[System]        File Access Date/Time           : 2022:09:19 22:22:28+02:00
[System]        File Inode Change Date/Time     : 2022:09:19 22:22:28+02:00
[QuickTime]     Create Date                     : 2017:12:26 14:24:32
[QuickTime]     Modify Date                     : 2017:12:26 14:24:32
[Track1]        Track Create Date               : 2017:12:26 14:24:32
[Track1]        Track Modify Date               : 2017:12:26 14:24:32
[Track1]        Media Create Date               : 2017:12:26 14:24:32
[Track1]        Media Modify Date               : 2017:12:26 14:24:32
[Track2]        Track Create Date               : 2017:12:26 14:24:32
[Track2]        Track Modify Date               : 2017:12:26 14:24:32
[Track2]        Media Create Date               : 2017:12:26 14:24:32
[Track2]        Media Modify Date               : 2017:12:26 14:24:32

(I used Graphic Converter 11 for all conversions, and the Exiftool command
exiftool -m -P -overwrite_original_in_place -wm w -Canon:ThumbnailImage= dir
to remove ExifIFD/IFD0 dates that were 2 hours ahead (my camera was set to a wrong hour before shooting).

Here are pictures showing the problem with the video still set to Paris. (Because can't set time zone of a video with GC11, indeed, I can only set EXIF timezone!)
https://ibb.co/W5xvYB3
https://ibb.co/VjcsDbz
https://ibb.co/hCjr9R5
They describe with detail the problem, it'll be easier for you to understand

Any idea?



Thank you so much for any help.

Tonio

Phil Harvey

Hi Tonio,

I think you probably need to add -api QuickTimeUTC to your commands for these videos.

Read here for an explanation.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

wywh

GraphicConverter works quite well also for movies although I often revert to exiftool to set the filenames via metadata (see below), edit GPS, occasionally edit some title, description or author. I have not yet pestered GC author about more movie metadata support because it is such a mess and a moving target (and occasionally I have reminded him to re-set some date option correctly for movies in new GC versions). In movies from some devices I rename files based on file creation or modification date in GC because the 'QuickTime:CreateDate' yields an incorrect time, then run it through my exiftool edit date metadata command.

Have you set GraphicConverter > Preferences > Browser > Movie (MP4/MOV) editing: Creation date/time uses UTC?

I use this to check the dates in images and movies:

exiftool -a -G1 -s -api QuickTimeUTC=1 -time:all .
Check also "Movie dates and Photos.app":

https://discussions.apple.com/docs/DOC-250002750

Movie Title, Description, Author and Keywords:

https://exiftool.org/forum/index.php?topic=12176

- Matti

Tonio

Hello Matti, hello Phil

Thank you both of you for your support, your answers, and sorry for the late reply.
I had entirely read your post Matti, "Movies dates and Photos.app" which is very interesting; I think that the first time, I didn't get all the details. Now I start to understand. It is very interesting, because I managed to put a video in order with your incredible command:
exiftool -api QuickTimeUTC=1 '-AllDates<filename' '-Track*Date<filename' '-Media*Date<filename' '-Keys:CreationDate<filename' -execute '-FileCreateDate<filename' '-FileModifyDate<filename' -common_args -m -P -overwrite_original_in_place -wm w dir
(I don't know why, all those fields had 1 hour more before using this command. I guess GC11 is not optimized for videos once again.)

Now it's sorted in Photos.app - HOWEVER, it doesn't work for the Canon videos.
Indeed, Canon videos don't have any "Keys" field, so if I trust your post it should be [QuickTime] that is taken into account by Photos.app instead of [Keys]. But the problem is that... ExifTool says that my Canon vids are 15:24:32+01:00 (which is the right time). If I switch my system to UTC+00:00 for Iceland I also get the right time: 14:24:32+00:00. But in Photos.app there is still no time zone!!! And the video is sorted at the right place, still with one more hour compared to the photos around.


I'm confused. Canon videos are a mess, even more than the rest...

---

Quote from: wywh on September 20, 2022, 03:24:27 AMthe 'QuickTime:CreateDate' yields an incorrect time
Do you mean that GC11 doesn't display the time zone after some dates in fields like [QuickTime]? (But what about [Track] and [UserData]? There is no time zone with those fields... by the way I get no date in the UserData fields in my videos, I don't know why.)

---

Some tip: when working on photos and videos that belong to another time zone, we have to remember to "refresh" the GC11 interface because if you don't, you will easily get confused!

---

Another question: I deal with an annoying problem in GC11. When looking at media that is not the same time zone than your system's, you can notice that both creation date and modification date are adjusted when switching to the same time zone as media's. But the Exif date, although set to the right date with the right timezone in metadata, is displayed as if it was still the system's time zone was the same as the picture's time zone: however, under the thumbnail I see "UTC" instead of "UTC+1"! Please check this example with the explanations: https://ibb.co/0DGqChf. Description of this picture:
System timezone: UTC+00:00 (same timezone as the picture at the right)
First line under thumbnail is the creation date
2nd line is the modification date
3rd line is the Exif date

Left picture: real date 10:25:28+01:00
why is Exif date (3rd line under the thumbnail) displaying "10:25:28 UTC" instead of "10:25:28 UTC+01:00"?
Video in the middle: real date 10:48:46+01:00
same problem as the picture at the left, why is Exif date set to "UTC" instead of UTC+1?
Right picture: real date 19:14:12+00:00.
No problem for this one, as the system's timezone is the same as the picture's timezone.
To sum up it seems that there is no change in the metadata but visually, the dates get asynchronous under the thumbnail. Any explanation? GC11 bug?


Thank you

Tonio

Tonio

Quote from: wywh on September 20, 2022, 03:24:27 AMHave you set GraphicConverter > Preferences > Browser > Movie (MP4/MOV) editing: Creation date/time uses UTC?
Sorry, this option was unchecked. However I'm not sure to understand. I don't know if my Canon 90D saves the date to the local referential, the only thing I know is that I can use an iPhone as a GPS with my camera (I didn't use this option before taking the photos) and that I can plug a GPS into my camera, but same, I didn't do this for the photos I'm talking about right now.

To me, the real problem is that I can't, by any way, insert time stamp in the video as for the photos. This leads the video to be 1 hour more than the photos around, if I could tell Photos the video was not taken in Paris but in Reykjavik, the job would be done.

I know this is possible because the iPhone videos that have GPS data and the [Keys] field, are located in Reykjavik.

Tonio

Tonio

Actually, I think it is impossible to solve this problem. Because you can't store any timezone in the Canon default video's fields. The only way to get rid of those inconsistencies in Photos.app is to add and set the [Keys] field with the following command:
exiftool -m -overwrite_original_in_place '-Keys:CreationDate=YYYY.MM.DD hh:mm:ss+00:00' movie.mov(thank you Matti)
and, optionnally, add and set the UserData field with the following command.
exiftool -m -overwrite_original_in_place '-UserData:DateTimeOriginal=YYYY.MM.DD hh:mm:ss+00:00' movie.mov
And here is a grouped command I found to run one command for each file:
exiftool -m -overwrite_original_in_place '-Keys:CreationDate=0001:01:01 00:00:00+00:00' movie.mov && exiftool -m -overwrite_original_in_place '-UserData:DateTimeOriginal<Keys:CreationDate' movie.mov


Thank you for your support anyway,

Tonio

wywh

Movie metadata is a mess. But try to find a workflow that puts the time in images and movies so they sort correctly in the apps you use. Then stick to that workflow. But future application updates might break it. So the next time you import the same file to a new version of Photos.app, it might get a different time if the logic has changed.

Images use local time in 'ExifIFD:DateTimeOriginal'. But also the movie tag 'Keys:CreationDate' is local time with time zone. Also movie tag 'UserData:DateTimeOriginal' is local time with time zone but I try to avoid it because 'Keys' overrides it in Photos.app anyway.

On the other hand movie metadata 'Quicktime:CreateDate' is UTC. Programs that read the dates properly should adjust it to local time. Also exiftool '-api QuickTimeUTC=1' option converts 'QuickTime:CreateDate' UTC time to the local time zone that the computer is set to.

Sometimes incorrect sorting needs you to look for all date stamps or locations:

For example, if there are no Keys or UserData date tags, macOS 12 Photos.app uses the GPS location for the timezone in .mp4, .m4v and .mov. So movies without GPS report computer's time zone while movies with GPS report and sort based on GPS time zone.

In one older Photos.app version also the 'GPS:GPSTimeStamp' produced incorrect .jpg sorting based when some iPhone images taken inside had happened to get the last GPS signal and time stamp. And while some Canon images did not have 'GPS:GPSTimeStamp' at all but only pasted coordinates.

- Matti

Tonio

Quote from: wywh on September 25, 2022, 04:16:23 AMIn one older Photos.app version also the 'GPS:GPSTimeStamp' produced incorrect .jpg sorting based when some iPhone images taken inside had happened to get the last GPS signal and time stamp. And while some Canon images did not have 'GPS:GPSTimeStamp' at all but only pasted coordinates.
Hello Matti,

Thank you once again for your help, and thank you for the last info. I didn't know.

For the rest of your message, I totally agree, and it took me quite a long time to understand but I think that now, it's clear.

I am now trying to find a workflow or an ExifTool command that uses the creation date of the video (or Exif date if set) to set the [QuickTime] and [Track] dates. As they are UTC, I can't use your command
exiftool -api QuickTimeUTC=1 '-AllDates<filename' '-Track*Date<filename' '-Media*Date<filename' '-Keys:CreationDate<filename' -execute '-FileCreateDate<filename' '-FileModifyDate<filename' -common_args -m -P -overwrite_original_in_place -wm w
to set those dates because the name of the file is not UTC.
(Edit: it would work in UTC+00:00 zones, but it's not the case for everyone.)


Thank you

Tonio

Tonio

Sorry, I am totally wrong in my last message

Your command automatically sets the time to UTC even if the file name format isn't UTC, when the system is same timezone as videos. (Didn't try when system is different from the videos timezone)

But I absolutely don't understand how it is possible. Your command is very powerful, but I don't understand how it works for now

Tonio