[UR] Oddity using Metadata template with QT date/time tags

Started by jch2103, April 05, 2019, 01:43:42 AM

Previous topic - Next topic

jch2103

I'm trying to set up an efficient way to copy time/date information from one video file to processed output video files (the tools I've used so far lose the date/time information.

I set up a Metadata Template to copy from {File.MD.XMP::photoshop\DateCreated\DateCreated\0} (which I had manually copied from the original video file via copy and paste with a metadata panel) to the QuickTime::MovieHeader\CreateDate and QuickTime::MediaHeader\MediaCreateDate tags. Despite using what should have been proper formatting {File.MD.XMP::photoshop\DateCreated\DateCreated\0|format:YYYY:MM:DD hh:mm:ss}, the Metadata Template failed to copy the data, giving the attached ExifTool output. StarGeek on the ExifTool forum noted that it was trying to write the date incorrectly (despite the formatting syntax).

The odd thing is that when I added one more output date/time tag XMP::exif\DateTimeDigitized to the Metadata Template (see attached screenshot), it worked properly (!!??). I have no idea why it works now, but have a suspicion that it has something to do with the internal format of the QuickTime tags (blanks show up as 0000:00:00 00:00:00 instead of as blanks).

I post this in case anyone else runs into a similar situation. At least the Metadata Template works for me now.
John

Mario

Always ensure that the date format your template produces is

YYYY:MM:DD HH:MM:SS

with an optional time-zone offset in the form +HH:MM or -HH:MM or Z (to indicate UTC).

In your example, ET is trying to write

-QuickTime:MediaCreateDate=4/3/2019 3:58:10 PM
-QuickTime:CreateDate=4/3/2019 3:58:10 PM

which is definitely your local date and time format and thus not suitable.
ExifTool reports this, too:

Warning: Day '58' out of range 1..31 in QuickTime:MediaCreateDate (ValueConvInv)
Warning: Day '58' out of range 1..31 in QuickTime:CreateDate (ValueConvInv)

so it runs into problems parsing the date and time format you have created.

As explained in the MD Template help topic and also in the Variables help topic, IMatch by default returns your local date and time format when you use date/time variables. You need to use format:YYYY:MM:DD HH:MM:SS to produce the ISO date and time format expected by ExifTool when you manually set date and time metadata tags.

This is not a bug in IMatch, this is how metadata works.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook