Exiftool and Microsoft reporting different output times

Started by break80, August 22, 2016, 05:25:34 PM

Previous topic - Next topic

break80

In Windows Photo Gallery, an MOV movie file from a 2004 trip had the wrong time.  So I changed the "Date Taken" time to 7:52 PM in Photo Gallery and the file is now sorted properly.  File Explorer shows "Date Taken" time as 7:52 PM as well.  And the file's properties show "media created" time as 7:52 PM.  All looks in order.

But, when I look at the tags using ExifTool -s -G test2.mov (below), only File and QuickTime dates are reported and NONE of them match above reported time.  Can you tell me what I am missing? 


[ExifTool]      ExifToolVersion                 : 10.25
[File]          FileName                        : test2.mov
[File]          Directory                       : .
[File]          FileSize                        : 25 MB
[File]          FileModifyDate                  : 2016:08:21 17:41:59-05:00
[File]          FileAccessDate                  : 2016:08:22 15:47:31-05:00
[File]          FileCreateDate                  : 2016:08:22 15:47:31-05:00
[File]          FilePermissions                 : rw-rw-rw-
[File]          FileType                        : MOV
[File]          FileTypeExtension               : mov
[File]          MIMEType                        : video/quicktime
[QuickTime]     MovieDataSize                   : 26590074
[QuickTime]     MovieDataOffset                 : 288
[QuickTime]     MovieHeaderVersion              : 0
[QuickTime]     CreateDate                      : 2004:10:31 15:57:32
[QuickTime]     ModifyDate                      : 2004:10:31 15:57:32
[QuickTime]     TimeScale                       : 1709996
[QuickTime]     Duration                        : 0:01:53
[QuickTime]     PreferredRate                   : 1
[QuickTime]     PreferredVolume                 : 100.00%
[QuickTime]     PreviewTime                     : 0 s
[QuickTime]     PreviewDuration                 : 0 s
[QuickTime]     PosterTime                      : 0 s
[QuickTime]     SelectionTime                   : 0 s
[QuickTime]     SelectionDuration               : 0 s
[QuickTime]     CurrentTime                     : 0 s
[QuickTime]     NextTrackID                     : 3
[QuickTime]     TrackHeaderVersion              : 0
[QuickTime]     TrackCreateDate                 : 2004:10:31 12:47:32
[QuickTime]     TrackModifyDate                 : 2004:10:31 12:47:32
[QuickTime]     TrackID                         : 1
[QuickTime]     TrackDuration                   : 0:01:53
[QuickTime]     TrackLayer                      : 0
[QuickTime]     TrackVolume                     : 0.00%
[QuickTime]     ImageWidth                      : 320
[QuickTime]     ImageHeight                     : 240
[QuickTime]     GraphicsMode                    : ditherCopy
[QuickTime]     OpColor                         : 128 128 128
[QuickTime]     CompressorID                    : h263
[QuickTime]     VendorID                        : Kodak
[QuickTime]     SourceImageWidth                : 320
[QuickTime]     SourceImageHeight               : 240
[QuickTime]     XResolution                     : 128
[QuickTime]     YResolution                     : 128
[QuickTime]     CompressorName                  : H.263
[QuickTime]     BitDepth                        : 24
[QuickTime]     VideoFrameRate                  : 15.003
[QuickTime]     MatrixStructure                 : 1 0 0 0 1 0 0 0 1
[QuickTime]     MediaHeaderVersion              : 0
[QuickTime]     MediaCreateDate                 : 2004:10:31 12:47:32
[QuickTime]     MediaModifyDate                 : 2004:10:31 12:47:32
[QuickTime]     MediaTimeScale                  : 8000
[QuickTime]     MediaDuration                   : 0:01:53
[QuickTime]     Balance                         : 0
[QuickTime]     HandlerClass                    : Data Handler
[QuickTime]     AudioFormat                     : ulaw
[QuickTime]     AudioChannels                   : 1
[QuickTime]     AudioBitsPerSample              : 16

Also when I change the QuickTime date to something different using the ExifTool option -QuickTime:CreateDate="2004-10-31 10:00:00" , ExifTool changes the reported time to 10:00 but does not change the Photo Gallery, File Explorer, or file properties  "Date Taken" or "media created" reported times.  (I am also aware that writing QuickTime tags is not supported by ExifTool as per the documentation, so I am confused how ExifTool was able to change the time anyway in the file?)


p.s. Glad this forum is back online. 

StarGeek

Any changes in the output when you add the -a (Allow duplicate tags to be extracted) option?
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

break80


StarGeek

Turns out I had Photo Gallery installed, though I'm not sure what version, as there doesn't seem to be a way to check.  I started it, put a couple random mp4s into the dir it's monitoring.

First one I changed the date on it.  It shows the new date in Photo Gallery, but when I go to Windows and select Properties->Details, there's not sign of the changed date.  Nothing in exiftool either.

On the second mp4, I change the date and it shows the new date in Photo Gallery.  When I check under Windows, there isn't a Date Taken property, but there is a Media Created property.  Checking with Exiftool, there is now a Microsoft:EncodingTime tag and a Quicktime:ContentCreateDate tag with the new date.

Unfortunately, I can't replicate your experience.  Either Windows properties doesn't match or there is a match and a couple new tags in the file.   My guess in your case is that Photo Gallery isn't actually writing the new date to the video.  I'd suggest making a copy of the video and changing the date/time on the second file.  Then you can use the Windows FC /B (FC docs) command to see if they're different.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

break80

It turns out I failed in my original posting to show the whole exiftool output by mistake.  Sorry about that. 

Looking at my MOV file again, yes, you are quite right.  When I change the time in Windows Photo Gallery (WPG) to 11:50 PM (which is UTC -6 for my time zone) and look into the file using exiftool, both the Quicktime:EncodingTime and Quicktime:ContentCreateDate change to that time, expressed as Zulu (with a Z at the end).  No other QuickTime times change. 

   [QuickTime]     EncodingTime                         : 2004:11:01 05:50:00Z
   [QuickTime]     ContentCreateDate               : 2004:11:01 05:50:00Z

FIle Properties Details (FPD) reports these date/time's as "media created" and WPG reports it as "Date Taken".  I presume the rights to alter EncodingTime and ContentCreateDate in the file metadata is some sort of compromise between Apple and Microsoft.
I noticed when I use exiftool to change the other QuickTime times, they do actually change but have no effect on what WPG or FPD reports.   

Bottom line is, for MOV files at least, WPG apparently knows how, or has legal rights, to change the QuickTime EncodingTime and ContentCreateDate, but exiftool cannot change them.  This supports what ExifTool documentation says about MOV file.  MP4 files might be slightly different.

Finally, I ran the binary file compare FC /b on two different files where only the date was changed in WPG and there was a small change.  When I change the dates using exiftool, many records change.  It doesn't tell me anything however except that exiftool is in fact changing some of the data as I reported above.

Also, my version of WPG is WPG 2012, Build 16.4.3528.331.  You find this in File-About tabs.  There is also a curious footnote in the about that says "Portions of this software are based in part on the work of the Independent JPEG Group."  This group may have altered something to make all this work as it should.

One more thing, do you know if exiftool knows a "Z" at the end of a time stamp means Zulu or UTC time?  I could not find anything on that question in the forum.
 
This has been an experience and an education.  Thanks for your support. 



     

StarGeek

Quote from: break80 on August 23, 2016, 03:29:51 PM
Also, my version of WPG is WPG 2012, Build 16.4.3528.331.  You find this in File-About tabs.

Ah, got it.  Same version here.

QuoteThere is also a curious footnote in the about that says "Portions of this software are based in part on the work of the Independent JPEG Group."  This group may have altered something to make all this work as it should.

That's just legal acknowledgement of the code it's using.  Nearly all jpeg code is based upon the original IJG code originally published in 1991 (Wiki note).  I doubt it has changed in years.

QuoteOne more thing, do you know if exiftool knows a "Z" at the end of a time stamp means Zulu or UTC time?  I could not find anything on that question in the forum.

Honestly, I'm not sure, but doing a few searches seems to suggest that they're the same.  On the wiki, both Zulu Time and UTC time redirect to the same article, Coordinated Universal Time, though Zulu specifically redirects to the time zones section.  You may have to wait for Phil to return to get further details.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

StarGeek

Quote from: break80 on August 23, 2016, 03:29:51 PM
One more thing, do you know if exiftool knows a "Z" at the end of a time stamp means Zulu or UTC time?  I could not find anything on that question in the forum.

I found this post.  Phil says "The QuickTime specificate states that the stored time should be in UTC."  Since these are quicktime tags, I'd say you can assume that they stand for UTC, if there is any difference.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

break80

Sorry, I wasn't clear.  I am aware that UTC and Z should be the same time measured in the time zone where the Prime Meridian is located, e.g. GMT.  But what I meant to ask is this...does ExifTool know what the "Z" means?  I could find no mention of it recognizing the "Z" in a time stamp.

StarGeek

Quote from: break80 on August 23, 2016, 05:15:02 PM
I am aware that UTC and Z should be the same time measured in the time zone where the Prime Meridian is located

I was unfamiliar with the whole thing, so it was a learning experience for me.

QuoteBut what I meant to ask is this...does ExifTool know what the "Z" means?  I could find no mention of it recognizing the "Z" in a time stamp.

I'm not sure.  But I think I can test it out.  Take a test image, set two time tags to the same time, but add Z for time zone to one of them.  I used XMP tags because they can take the time zone and EXIF tags cannot.  Use the -d option with the "%s" option (number of seconds since the Epoch, UTC).  Without the time zone, Exiftool will use the local time zone, see notes under Common Date Format Codes.  Here's the results:
c:\>exiftool -createdate -datetimeoriginal -G1 X:\!temp\Test3.jpg
[XMP-xmp]       Create Date                     : 2016:04:04 09:19:03Z
[XMP-exif]      Date/Time Original              : 2016:04:04 09:19:03

c:\>exiftool -d "%s" -createdate -datetimeoriginal -G1 X:\!temp\Test3.jpg 
[XMP-xmp]       Create Date                     : 1459761543
[XMP-exif]      Date/Time Original              : 1459786743


Since it outputs two different numbers, I'd say that shows that it recognizes the Z time zone.  -25,200 seconds difference or -7 hours, which is my time zone.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Phil Harvey

Yes, ExifTool should recognize the "Z" time zone designation.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).