Hi, I have approx 500+ videos in my Icloud that have the right dates when viewed using the Photos app.
I know there have been quite a few postings regarding this issue, but I am not able to resolve my issue despite combing through your site and numerous other sites.
As per the attached picture - I want to use the '31 October 2019' dates that Photos is showing, but Finder is showing the system creation date on my local computer & Exiftools is showing the same details as Finder. I've also used the -a command and there is no reference to the '31 October 2019'.
I can't figure out where the '31 October 2019' data is held so that I extract and overwrite the mp4 CreateDate. Is there a way to get this information from the Photos app and run it across my 500+ mp4? I would like to be able to do this as a batch, I don't relish changing 500+ files one at a time..
Thank you.
It does look like Photos is getting the date/time from somewhere in the file. If so, and since ExifTool doesn't extract this date/time, then it is possible that it is pulling this from the video stream which ExifTool doesn't decode. I would be surprised at this, but I will run some tests of my own when I get a chance.
The only other alternatives I can think of are:
1. Could Photos be getting this date/time from an external database?
2. Are there any MacOS attributes that contain this date/time? (add -api requestAll=2 to your ExifTool command when extracting date/time tags).
- Phil
Hi Phil,
Thank you for the quick response.
I've tried the 2nd option and added in the -api requestAll=2, but the information is not there either.
As to your first point, I was wondering whether the folder structure itself holds a clue as the photos app folder structure contains the creation date i.e
Desktop/Masters/2019/10/31/20191031-092724/c693cd69-b89b-469c-9f20-3edbc24b0ce3.mp4
Andy
Hi Andy,
Ah, yes. Try this:
exiftool '-createdate<${directory;$_ = /(\d{8}-\d{6})/ ? $1 : undef}' -api quicktimeutc FILE
This command will take the date/time from the directory name and insert it into CreateDate. I'm also using the QuickTimeUTC option to store the dates in UTC as they should be (the default of using local time is actually wrong, but this is the way that most early video cameras did it).
Note that FILE must contain at least the part of the directory specification that includes the date/time. Or you can specify a parent directory and use -r to process all contained videos. In this case you might want to add -ext mp4 to process only MP4 files.
The command will maintain a backup copy with "_original" appended to the file name. Once you are sure things are working properly you can add -overwrite_original to avoid this.
- Phil
Hi Phil,
Thank you - that did the trick - it worked and I managed to update across multiple files.
I do have one last question - is there a way to restrict the command line to only update for files that either have a blank create date, or currently filled with 0000:00:00 - this way any file that already have the right data is not modified.
Thanks again for taking the time out to help me with this, much appreciated.
Andy
Quote from: Andy.L on December 30, 2020, 06:49:30 PM
I do have one last question - is there a way to restrict the command line to only update for files that either have a blank create date, or currently filled with 0000:00:00 - this way any file that already have the right data is not modified.
For videos, you would add
-if '$CreateDate=~/0000:00:00 00:00:00/'to the command.
Photos.app 6.0 (macOS 11 Big Sur) grabs the date in the following order from mp4, m4v and mov movie metadata tags (Photos.app 5.0 in macOS 10.15 Catalina is about the same, and Photos.app 4.0 in macOS 10.14 Mojave behaves slightly differently).
[Keys] CreationDate : 2004:04:04 12:04:04+02:00
[UserData] DateTimeOriginal : 2003:03:03 12:03:03+02:00
[QuickTime] CreateDate : 2002:02:02 12:02:02+02:00
[MacOS] FileCreateDate : 2001:01:01 12:01:01+02:00
I have never seen Photos.app getting the date from the parent folder. I don't use iCloud for Photos but maybe that '31 October 2019' is the date the movie was uploaded to iCloud, and because it does not have those Keys, UserData or QuickTime dates, Photos.app resorted to the iCloud database date?
https://discussions.apple.com/docs/DOC-250002750