Mac - setting QT MP4/M4V file creation date to track-created time

Started by clem, November 12, 2015, 02:14:18 AM

Previous topic - Next topic

clem

Hello,

I've searched through the forums and have gathered a bit of information re: date & time of files along with the quirk of the Mac re: setting file creation dates that the only way to do that is to set the modify date to an earlier date than the existing date... so I can rename the files but getting the file creation date to 'stick' seems not so obvious.

I have managed to get files renamed to the track create date... but to get the file attributes to reflect create date and modify date as separate items [as per QuickTime  CreateDate ModifyDate tags] seems to be eluding me. I know I can manually do this on an individual basis with the Mac command line "SetFile -d' and 'SetFile -m' but to do this for a few thousand files across multiple directories is not that appealing.

if I do:

exiftool -time:all -a -G0:1 -s ~/Desktop/20150309_202552.mp4

[File:System]   FileModifyDate                  : 2015:11:11 15:08:15-08:00
[File:System]   FileAccessDate                  : 2015:11:11 15:18:50-08:00
[File:System]   FileInodeChangeDate             : 2015:11:11 15:08:15-08:00
[QuickTime]     CreateDate                      : 2015:03:09 20:25:52
[QuickTime]     ModifyDate                      : 2015:03:09 20:26:05
[QuickTime:Track1] TrackCreateDate              : 2015:03:09 20:25:52
[QuickTime:Track1] TrackModifyDate              : 2015:03:09 20:26:05
[QuickTime:Track1] MediaCreateDate              : 2015:03:09 20:25:52
[QuickTime:Track1] MediaModifyDate              : 2015:03:09 20:26:05


How can I get this to happen?

thank you,

:)

Phil Harvey

Doesn't this work to set the OS X file creation and modification dates to the same as the track?:

1. exiftool "-filemodifydate<trackcreatedate" ~/Desktop/20150309_202552.mp4

2. exiftool "-filemodifydate<trackmodifydate" ~/Desktop/20150309_202552.mp4

As long as the original file creation date is on or after TrackCreateDate then this should work.  The first command will then push back the file creation date.

- Phil

Edit: If the file creation date is somehow (but how?) before the TrackCreateDate, then you could force the file to be rewritten to reset the creation date by editing some dummy tag when setting the FileModifyDate in the first command:

exiftool -xmp:worktodo-= "-filemodifydate<trackcreatedate" ~/Desktop/20150309_202552.mp4
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

clem

Super. That seems to have done the trick. Yay!

It's also done a good job of showing up the files with damaged/stripped metadata as they get beginning of epoch time stamps too. :)

thanks!