Timestamps of Mp4s from Google Photos Takeout are not readable by Apple Photos

Started by derschmodel, June 16, 2020, 06:50:55 AM

Previous topic - Next topic

derschmodel

Hello there,

first of all I would like to thank you for this fantastic tool! It is a mystery to me why there is no bigger outcry because of certain mainstream platforms (like Google Photos): The data from Takeout would be completely useless for proper cataloging without your tool. As many people have decided to move away from Google Photos lately. After a lot of fiddling around, I managed to feed most of my media with the right information from the JSON files using your tool.

Problem with Apple Photos
On taking inventory of my media I am currently moving to Apple Photos (reasons complicated). There is a problem with the Mp4 files, as already discussed here:

Quote from: wywh on May 19, 2020, 04:24:58 AM
Quote from: Resultant on December 23, 2019, 11:23:30 AM
shows up in Apple Photos as "November 24, 183057   7:15:10 PM". Yes, you read that correct - 183057.

Forgive me replying to an oldish thread but I, too, lost some hair because of this until I noticed that if "[Keys] CreationDate", "[UserData] DateTimeOriginal" and obviously also "[Quicktime] DateTimeOriginal" lack a timezone like +02:00, then Catalina's Photos.app 5.0 generates weird scrambled datetimes with the year displayed something like "177294" etc. So it is important to make sure a timezone is set there. For example, some exiftool commands like "-AllDates<filename" create "[UserData] DateTimeOriginal" without timezone by default. Or use "-wm w" -- only write existing tags so that "-AllDates<filename" does not create a new "[UserData] DateTimeOriginal" tag.

Whenever I import one of the Mp4 files into Apple Photos, it gets a twisted timestamp inside the application like October 25th 186825.
But if I examine my testfile before importing it says:

---- System ----
FileModifyDate                  : 2020:06:13 04:35:04+02:00
FileAccessDate                  : 2020:06:14 11:48:50+02:00
FileInodeChangeDate             : 2020:06:15 22:40:47+02:00

---- System ----
FileModifyDate                  : 2020:06:16 11:55:09+02:00
FileAccessDate                  : 2020:06:16 11:55:09+02:00
FileInodeChangeDate             : 2020:06:16 11:55:09+02:00
---- QuickTime ----
CreateDate                      : 2020:01:14 20:49:45
ModifyDate                      : 2020:01:15 11:52:47
---- Track1 ----
TrackCreateDate                 : 2020:01:15 11:52:47
TrackModifyDate                 : 2020:01:15 11:52:47
MediaCreateDate                 : 2020:01:15 11:52:47
MediaModifyDate                 : 2020:01:15 11:52:47
---- Track2 ----
TrackCreateDate                 : 2020:01:15 11:52:47
TrackModifyDate                 : 2020:01:15 11:52:47
MediaCreateDate                 : 2020:01:15 11:52:47
MediaModifyDate                 : 2020:01:15 11:52:47
---- UserData ----
DateTimeOriginal                : 2020:01:14 20:49:45
---- XMP-exif ----
DateTimeOriginal                : 2020:01:14 20:49:45

January 14 2020 is the timestamp I desire and it seems ok in the QuickTime line. All this information was already pulled out of the JSON files by me.

Question and goal
My goal is to make the QuickTime timestamp of several hundred Mp4 files readable to Apple Photos. Is it enough to assign a time zone to all my Mp4s with one command, or may it also pull the information out directly from the JSONs? Unfortunately, with my little knowledge of script-based software I have not yet been able to convert the information from the thread into a corresponding command that solves my problem. I live in the Central European Time Zone.

Thank you very much for your time and I hope my English is halfway tolerable - and that I didn't overlook a thread with obvious answers.

Greetings from Germany!
Michael

StarGeek

Quote from: derschmodel on June 16, 2020, 06:50:55 AM
Question and goal
My goal is to make the QuickTime timestamp of several hundred Mp4 files readable to Apple Photos. Is it enough to assign a time zone to all my Mp4s with one command, or may it also pull the information out directly from the JSONs?

The Google Takeout JSON doesn't include time zones, as far as I can recall, so you can't take it from there. 

While I don't have access to a Mac to be able to test, I don't believe that the QuickTime:DateTimeOriginal tag is required.  I would first try removing that from a test file and see if Apple Photos is able to display the date correctly.  If that is the case, it would be much easier to just remove that tag from all the files.
exiftool -DateTimeOriginal= /path/to/files/

Otherwise, yes, you could add the time zone in batch with
exiftool '-DateTimeOriginal<${DateTimeOriginal}+02:00 /path/to/files/
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

derschmodel

Thank you very much, you made (at least) my day!

Quote from: StarGeek on June 16, 2020, 11:33:46 AM
While I don't have access to a Mac to be able to test, I don't believe that the QuickTime:DateTimeOriginal tag is required.  I would first try removing that from a test file and see if Apple Photos is able to display the date correctly.  If that is the case, it would be much easier to just remove that tag from all the files.
exiftool -DateTimeOriginal= /path/to/files/

This command did it for me. I got some errors because of too large file sizes, but I can manage to change the date on those few items myself.
I couldn't imagine how simplistic the code for the last step of my Google Photo metadata odyssey would be.

Best regards!

StarGeek

Quote from: derschmodel on June 16, 2020, 01:33:21 PM
This command did it for me. I got some errors because of too large file sizes,

Try adding -api LargeFileSupport
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

derschmodel

Quote from: StarGeek on June 16, 2020, 08:04:01 PM
Try adding -api LargeFileSupport

That worked. Now I was finally able to fill each and every file from Google Photos with its associated information.
Many thanks again for the quick answers - and in total for the existence of this tool!