ExifTool Forum

ExifTool => Newbies => Topic started by: hogati on June 26, 2020, 02:50:20 PM

Title: Fixing mp4 CreateDate and ModifyDate using filenames
Post by: hogati on June 26, 2020, 02:50:20 PM
ok, I'm new to this so I'm sorry if this question was already answered somewhere else. I've been reading a while for a few days and doing some testing without any success.

I have some mp4 files (clips I receive on Whatsapp mostly) which I'm trying to sort into subfolders organized by date with Hazel, but it looks like Hazel can't get the correct dates, meaning the dates the videos were shot.

A thing is very confusing to me is that when I look at file properties on Finder, both Create and Modify dates are correct or at least, equal to the date in the filenames. But when I look at basic information or raw data in Adobe Bridge, dates differ from the original (I'm attaching some prints). How is this possible?

So, what I'm trying to do is to write a new CreateDate and Modify Date based on the filename which is in this format: 2018-12-11 21.14.01.mp4

What should be the command lines to achieve this?

Thank you so much!  ;D


Title: Re: Fixing mp4 CreateDate and ModifyDate using filenames
Post by: StarGeek on June 26, 2020, 03:33:25 PM
If that date is off by the time zone of the computer, then the value in the file is correct.  According to the spec, the time stamp in video files is supposed to be set to UTC (see 4th paragraph under Quicktime tags (https://exiftool.org/TagNames/QuickTime.html)).  Finder (and Windows) understands this and will adjust the displayed time accordingly.

Adobe Bridge (and other Adobe products) do not read the time stamp correctly and display the raw, unadjusted value.

You have to decide if it is more important for Finder to read the correct time or Bridge, because one or the other is going to have to be wrong.

If you want to set the time correctly for Bridge, it will be a two step procedure, which, as a side effect, will set a tag read by the Apple Photo app correctly.  First, you will want to copy the adjusted time into the DateTimeOriginal tag
exiftool -api QuickTimeUTC '-Quicktime:DateTimeOriginal<Quicktime:CreateDate' /path/to/files/
Then copy the adjusted time back into the CreateDate.
exiftool '-Quicktime:CreateDate<Quicktime:DateTimeOriginal' /path/to/files/