Dear Developers,
I have a question (or maybe a feature request):
Is it possible to change the file date time stamp(s) (Created Date, Modified Date and maybe even Accessed Date) of .mpeg video files to that date stored in the "xmpDM:shotDate" data from corresponding .xmp files?
If yes, how?
If no, can you make it possible please?! ;)
Kind regards,
Tom
Hi Tom,
Sure:
exiftool -tagsfromfile %d%f.xmp "-filemodifydate<xmpDM:ShotDate" "-filecreatedate<xmpDM:ShotDate" -ext mpeg DIR
where DIR is the name of a directory containing the images and sidecars. Note: Writing FileCreateDate is supported only on Windows.
- Phil
Hi Phil,
great and thank you for the quick response! 8)
Kind regards,
Tom
PS:
Im on Windows 7 x64 so everything should be fine. ;)
Hi Tom,
Quote from: Phoenix on January 16, 2014, 01:14:43 PM
Im on Windows 7 x64 so everything should be fine. ;)
Well, not everything... You may notice some quirky behaviour with 1-hour-difference problems due to a daylight-savings-time bug in Windows. But if +/- one hour is close enough, then you are good to go! :)
- Phil
Hi Phil,
Yeah, I noticed this behaviour you've been talking about several times before. And didn't find a good solution for it either.
Thank you for clarifying that it's a bug. Strange that it hasn't been fixed yet by Microsoft.
But I could live with that as it would be at least better than nothing (or the current state of my files ;)).
Unfortunately it didn't work at all.
Maybe because of the date/time format in the .xmp(s) or maybe you misunderstood my target outcome.
Here is a date/time example as it is in my .xmp files (created by Adobe Premiere Pro):
QuotexmpDM:shotDate="2013-12-24T20:15:30"
So the format is: "YYYY-mm-ddTHH:MM:SS"
In fact this shouldn't be a problem in my opinion, because in the FAQ is to read:
QuoteExifTool is very flexible about the actual format of input date/time values when writing, and will attempt to reformat any values into the standard format unless the -n option is used. Any separators may be used (or in fact, none at all). The first 4 consecutive digits found in the value are interpreted as the year, then next 2 digits are the month, and so on. [The year must be 4 digits. Other fields are expected to be 2 digits, but a single digit is allowed if the subsequent character is a non-digit.] For EXIF date/time values, all 6 date/time fields must exist ("YYYYmmddHHMMSS"), but XMP date/time values require only the year ("YYYY").
That's just because I get some warnings like:
QuoteWarning: No writable tags set from [DIRECTORYPATH]/[FILENAME].xmp
Could it be that I'd need the -d flag in this case anyway?
And if yes, would this be the right format then:
-d "%Y-%m-%dT%H:%M:%S" ?
The other thing is, that you might have misunderstood my goal to just set the (Windows) filesystem file creation and modify dates of the .mpeg files but don't alter the binary content of these files at all.
So
no tags should be written or changed
inside of these files but their
filesystem time stamps should become adjusted.
Actually I guess you got me with that from the very first, but just to be sure. ;)
Or maybe I just made some other unknown mistake so that it didn't work.
Would be nice if you could help me further again to find out. ;)
Kind regards,
Tom
Hi Tom,
The command I posted should do what you want (change only the filesystem modification and creation dates). The format of the ShotDate is irrelevant because ExifTool reformats it to standard EXIF format when reading anyway. You should not use the -d option.
If you get the message "No writable tags set from XMPFILE", then it is because the tag "xmpDM:ShotDate" doesn't exist in the file. ... Ah. I see the problem. "xmpDM" is not an Exiftool group name. My mistake. Sorry. It should have been "XMP-xmpDM:ShotDate". (Or "XMP:ShotDate" or just "ShotDate" will work too.)
- Phil
Hi Phil,
thank you again, now it works. 8)
Kind regards,
Tom