Patched incorrect time zero for QuickTime date/time tag

Started by jaybee, November 08, 2016, 09:10:48 AM

Previous topic - Next topic

jaybee

I am not tech savvy. I am converting old videos from VOB, WMV, MOD etc to either MP4 (likely) or AVI (which do you think is better for quality as not concerned about file size).  The key for me is "CreateDate" as when I convert the videos the CreateDate is the date the video was converted rather than the date the original was created.  This is the data I need to modify.  I am using Exiftool 10.3.1.0 and ExifGUI 5.1.6.  In ExifGUI I highlight the MP4, go to the workspace, highlight the CreateDate (which is blank) and down below put in the appropriate date e.g. 2006-08-04 08:20:28 which is the local time the video was taken (MST).  My preference is to keep the dates local time.  When I hit "Enter" it saves the but when I hit "Save" it gives the following error message:
Nothing changed in MOV014.mp4
    0 image files updated
    1 image files unchanged
Warning: [minor] Patched incorrect time zero for QuickTime date/time tag - MOV014.mp4
<-END-

What am I doing wrong? :(

Phil Harvey

First, I would definitely recommend MP4.

ExifTool has only limited write ability for MP4 videos, but can change many of the date/time tags.

I don't know exactly what you are doing via the GUI, but QuickTime:CreateDate should be writable via ExifTool:

> exiftool -createdate="2006-08-04 08:20:28" a.mp4
Warning: [minor] Patched incorrect time zero for QuickTime date/time tag - a.mp4
    1 image files updated
> exiftool -createdate -G1 -a a.mp4
[QuickTime]     Create Date                     : 2006:08:04 08:20:28
[XMP-xmp]       Create Date                     : 2006:08:04 08:20:28


- 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 ($).

jaybee

Thanks for the heads up on MP4.  I am not sure how to run exifTool which is why I downloaded ExifToolGUI to provide a user friendly interface i.e. metadata for dummies.  It appears you are in ET.  I think you drop the mp4 video into the black screen but nothing happens in exiftool.exe.  I don't have the > exiftool prompt nor the location of the file.  Not sure how to get there which is why I was trying to use the GUI.  Assuming I can get there, what do you put in when you have 20 mp4 files because you dropped in a folder i.e. how do you choose one over the other i.e. change the correct date on a specific file.

Phil Harvey

Here are some instructions that may help you get started

After typing the exiftool command (up to but not including the "a.mp4" in my examples), you can drag and drop one more more files and or folders instead of typing "a.mp4" to process these files with exiftool.

- 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 ($).

jaybee

I am making progress.  Spent about an hour until I googled PATH and found out what that meant.  Now able to change the date with the following:  C:users\john\>exiftool "video location (from dragging and dropping)" -createdate="2006-08-04 08:20:28".  The result is [minor] Patched incorrect time zero for Quicktime date/time tag.

When I look at the CreateDate metadata it is correct with 08:20:28 (MST).  When I open it up in my viewing software (Playmemories Home by Sony) the Date Taken is 01:20:28.  How do I get the CreateDate to be show correct in PH.  I tried several things after researching the UTC changes.  The command I found was exiftool -alldates-=4 DIR [with the 4 as a 6 for MST not EST].  The result was  it the CreateDate changed to 2006:08:04 02:20:28 and the Date Taken in PM is 2006:08:03 19:20:28.  I was hoping to 1) Keep the "CreateDate" correct and display the Date Taken as the same date.

Thank you so much for your help.  If have never used the cmd line before so it is a bit challenging even to understand the blogs.

Phil Harvey

What date/time does PH show if you do this (ie. add the -api quicktimeutc option)?:

exiftool "video location (from dragging and dropping)" -createdate="2006-08-04 08:20:28" -api quicktimeutc

- 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 ($).

jaybee

The CreateDate is now incorrect at 2006:08:04 15:20:28 but the Playmemories date (which is the most important) is correct at 2006:08:04 08:20:28.  If that is the best solution possible I will take it. :).  The only issue may be if I ever use other software (besides PM) then all the dates may have to be redone to ensure the CreateDate is correct.   I have about 400 videos that have to be 1) converted to MP4 and 2) have the Create Date changes as appropriate.  Please let me know if this is the best possible solution and I will move forward.  If it is possible to have the dates match with the correct date then that is the best but not sure if it can be done.

Please advise.  Thank you very much for your help thus far.

Phil Harvey

The best solution is the one that works for you.  Unfortunately there isn't a lot of consistency in the way date/times are represented in MP4 videos, and different software interprets them in different ways.  This is just what happens if there isn't a good public specification for the format.

- 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 ($).

jaybee

Just to understand, this is likely the best solution so use it as there is no way to get the CreateDate and Playmemories Date the same i.e. use this method (with -api quicktimeutc) and move on?  I am Ok with it but just want to be sure as it will impact 100's of videos and many hours of work.

That said, thank you very much for your help.

Phil Harvey

I can't say for sure because I don't know what you on what you are basing that statement that CreateDate is wrong.  Is it wrong in the software that you care about?

- 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 ($).

jaybee

My apologies as I wasn't clear.  Playmemories (PM) draws the Date Taken (DT) from CreateDate (CD) in the metadata.  When I look at the most recent photos and videos (e.g. 2016) the DT and CD are the same i.e. I set the camera to the local time and both the DT and CD are the same and they indicate the local time the jpg or mp4 was taken. Then when I load them into PM, I arrange them by Date Taken and they play in the order that they were taken during the day switching between jpg or mp4 based on DT/CD.

The issue is I have older videos that have to be converted (WMV, AVI, MOD, MTS).  I know the time they were taken but when I convert them the CD is lost (I will likely use Wondershare Video Converter Ultimate (other suggestions?) and they have confirmed the CD will not transfer to the new mp4).  So I will need to go through each video manually and input the CD manually.  Your suggestion was to add -api quicktimeutc which means that the CreateDate is now incorrect at 2006:08:04 15:20:28 but the Playmemories date (which is the most important) is correct at 2006:08:04 08:20:28.  That is fine if that is the best that can be done.  If one day I use another software package that does not make the shift (from 2006:08:04 15:20:28 to 2006:08:04 08:20:28) then I will have to do it all over again.  Just want to be sure that using the -api quicktimeutc is the best option as I will have to do about 400 videos manually.

As always, thank you very much for your help.
J

Phil Harvey

OK.  I understand now, but I would like to see exactly what is going on.  Could you show me the date/time tags from a recent video (where DT/CD are correct).  I would like to see the output of these commands:

exiftool -a -G1 FILE

and

exiftool -a -G1 -api quicktimeutc FILE

And if you could repeat these commands for a video where you have tried to set CreateDate using ExifTool and the CD/DT are different in PM.

If you have trouble copying/pasting the ExifTool output you can send it to a file by adding ">> out.txt" to the end of the command.

Thanks.

- 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 ($).

jaybee

The date/time tags are as follows: 1) recent video where the CreateDate and Playmemories Date Taken are the same without and then with quicktimeutc and 2) an older converted video.  I have all the outputs saved if you need more info:

[ExifTool]      ExifTool Version Number         : 10.33
[System]        File Modification Date/Time     : 2016:01:30 11:44:46-08:00
[System]        File Access Date/Time           : 2016:01:31 02:45:58-08:00
[System]        File Creation Date/Time         : 2016:01:31 02:45:58-08:00
[QuickTime]     Create Date                     : 2016:01:30 14:44:33
[QuickTime]     Modify Date                     : 2016:01:30 14:44:46
[QuickTime]     Time Scale                      : 90000

[System]        File Modification Date/Time     : 2016:01:30 11:44:46-08:00
[System]        File Access Date/Time           : 2016:01:31 02:45:58-08:00
[System]        File Creation Date/Time         : 2016:01:31 02:45:58-08:00
[QuickTime]     Create Date                     : 2016:01:30 06:44:33-08:00
[QuickTime]     Modify Date                     : 2016:01:30 06:44:46-08:00
[QuickTime]     Time Scale                      : 90000

The CreateDate and Playmemories Date Taken on this file is 2016:01:30 14:44:33 and 2016:01:30 2:44:33 pm
=====================================================
[System]        File Modification Date/Time     : 2016:11:13 10:35:57-08:00
[System]        File Access Date/Time           : 2016:11:13 10:35:56-08:00
[System]        File Creation Date/Time         : 2016:11:07 11:23:49-08:00
[QuickTime]     Create Date                     : 2006:08:04 15:20:28
[QuickTime]     Modify Date                     : 2016:11:06 12:24:00
[QuickTime]     Time Scale                      : 90000

[System]        File Modification Date/Time     : 2016:11:13 10:35:57-08:00
[System]        File Access Date/Time           : 2016:11:13 10:35:56-08:00
[System]        File Creation Date/Time         : 2016:11:07 11:23:49-08:00
[QuickTime]     Create Date                     : 2006:08:04 08:20:28-07:00
[QuickTime]     Modify Date                     : 2016:11:06 04:24:00-08:00
[QuickTime]     Time Scale                      : 90000

The CreateDate and Playmemories Date Taken on this file is 2006:08:04 15:20:28 and 2006:08:04 8:20:28 am (the 8:20:28 is is the correct time taken prior to file conversion)





Phil Harvey

Interesting.

Playmemories Date Taken is not assuming UTC for the original video.  This is common (likely because the camera doesn't know the time zone).

The funny thing is that it is based on UTC for the edited video.

The first obvious difference is that the ModifyDate is different than the CreateDate for the edited version.  What happens if you make this the same as CreateDate?  I'm hoping that Playmemories decides on the time zone based on whether or not the file has been modified (ie. If CreateDate == ModifyDate then assume local time, otherwise UTC).

- 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 ($).

jaybee

I changed the Modify Date to the Create Date and re-ran the two scenarios for the converted (MOD to MP4) video:

[System]        File Modification Date/Time     : 2016:11:16 14:56:33-08:00
[System]        File Access Date/Time           : 2016:11:16 14:56:31-08:00
[System]        File Creation Date/Time         : 2016:11:07 11:23:49-08:00
[QuickTime]     Create Date                     : 2006:08:04 15:20:28
[QuickTime]     Modify Date                     : 2006:08:04 15:20:28

[System]        File Modification Date/Time     : 2016:11:16 14:56:33-08:00
[System]        File Access Date/Time           : 2016:11:16 14:56:31-08:00
[System]        File Creation Date/Time         : 2016:11:07 11:23:49-08:00
[QuickTime]     Create Date                     : 2006:08:04 08:20:28-07:00
[QuickTime]     Modify Date                     : 2006:08:04 08:20:28-07:00

When I run PlayMemories on the file after the second CD/MD I get a Date Taken of 2006-08-04 08:20:28

I tried changing the Create Date to 2006:08:04 10:00:00.  It changed.  PM now reads 2006-08-04 3:00:00 in that exact format (note the "-" instead of the ":")