ExifTool Forum

General => Metadata => Topic started by: jcharmon on April 04, 2019, 05:11:20 PM

Title: QuickTime tags 'null' date/time?
Post by: jcharmon on April 04, 2019, 05:11:20 PM
My Nikon Z6 camera records various video metadata in its .mov or .mp4 files (user can choose which container). No issues with this. However, when I edit the videos (e.g., with ShotCut or Davinci Resolve), the output files not surprisingly have no metadata, in particular none of the date/time information that's present in the original file. I would like to find a simple way to assign the original date/time of the source videos to the edited copies. I know that video files are a real metadata mess...

In trying to copy metadata, especially date/time information, from original video files to edited copies, I'm getting ExifTool errors that seem to be caused by invalid date/time format. I've used {File.MD.XMP::photoshop\DateCreated\DateCreated\0|formatYYYY:MM:DD hh:mm:ss} to try to format input for the QuickTime MovieHeader and MediaHeader CreateDate tags (I'm using ExifTool via an IMatch Metadata Template). My issue may have to do with the fact that the output video files seem to use a '0000:00:00 00:00:00' format for 'empty' date/time fields (other null date/time tags just seem to be completely empty) (see attached ExifTool output message).

I'm not sure if I'm trying to use the wrong syntax, or if there's something 'special' about the QuickTime null date/time tags that requires a special approach. Perhaps there's a better approach entirely?
Title: Re: QuickTime tags 'null' date/time?
Post by: StarGeek on April 04, 2019, 05:43:50 PM
Looking at your attached file, it shows that it's trying to write the dates incorrectly
-QuickTime:MediaCreateDate=4/3/2019 3:58:10 PM
-QuickTime:CreateDate=4/3/2019 3:58:10 PM


It should be trying to write them as
-QuickTime:MediaCreateDate=2019:04:03 15:58:10
-QuickTime:CreateDate=2019:04:03 15:58:10


or have a correcting -d (dateFormat) option (https://exiftool.org/exiftool_pod.html#d-FMT--dateFormat).  That's why you get the Day '58' out of range and the No writable tags set warnings. 

There seems an error in how the data is being copied.  Or possibly it's incorrect in the source file.
Title: Re: QuickTime tags 'null' date/time?
Post by: jcharmon on April 05, 2019, 05:15:34 PM
Update:

I added one additional date/time target field (XMP::exif\Date\TimeDigitized) to my process, using the exact same format statement as above.

This time it worked properly: all three date/time tags were properly filled (despite the ET message 'Warning: No writable tags set from D:\John\Pictures\Temp\Videos temp\DSC_1043 out-1.mp4'). (Attached ET output file seems to have more than one attempt in it.) So it seems that the data in the source file is correct at least.

This makes me wonder whether there's something odd about the QuickTime date/time tags (e.g., blank tags show '0000:00:00 00:00:00') or whether ExifTool ran into some issue accessing them. Or maybe something else is going on?
Title: Re: QuickTime tags 'null' date/time?
Post by: Phil Harvey on April 06, 2019, 06:53:23 AM
There will be no writable tags set from your source file because you are only trying to copy EXIF, IPTC and XMP tags from this file, and none of these exist.  The 0000:00:00 date is what ExifTool shows when the recorded date/time is zero.  This is also what you get when you try to delete a QuickTime date/time with ExifTool.

- Phil