Hello,
I'm a new user to ExifTool, and glad to have found it.
Let me just briefly describe my workflow and then the problem, and I'm hoping you can help me resolve it.
I have about 30 MiniDV tapes that I want to rip into video clips and have them live in Apple's Photos app, with the key feature that they are SEARCHABLE BY DATE. Eg, I want to find my child's 4th birthday videos, so I enter August 2006, and it shows up.
My general workflow I'm trying to use is:
MiniDV Cassette -> LifeFlix -> *.mov files -> ExifTool -> Apple Photos
LifeFlix is uniquely helpful by preserving the original DV "date code" data digitally encoded in the footage by stamping it into the resulting .mov file's Creation and Modification Dates (though not Access Date):
Daves-MBP:~ dkitabji$ ls -l /Users/dkitabji/Dropbox/test-ORIGINAL.mov
-rw-r--r--@ 1 dkitabji staff 374992807 Oct 21 2006 /Users/dkitabji/Dropbox/test-ORIGINAL.mov
Daves-MBP:~ dkitabji$ ls -lU /Users/dkitabji/Dropbox/test-ORIGINAL.mov
-rw-r--r--@ 1 dkitabji staff 374992807 Oct 21 2006 /Users/dkitabji/Dropbox/test-ORIGINAL.mov
Daves-MBP:~ dkitabji$ ls -lc /Users/dkitabji/Dropbox/test-ORIGINAL.mov
-rw-r--r--@ 1 dkitabji staff 374992807 Dec 12 19:27 /Users/dkitabji/Dropbox/test-ORIGINAL.mov
Daves-MBP:~ dkitabji$ ls -lu /Users/dkitabji/Dropbox/test-ORIGINAL.mov
-rw-r--r--@ 1 dkitabji staff 374992807 Dec 12 19:27 /Users/dkitabji/Dropbox/test-ORIGINAL.mov
which is also visible using the Mac's Finder.
Unfortunately, when the .mov file is imported to Photos, Photos thinks the video clip was shot at a date/time that matches "Creation Date":
Daves-MBP:~ dkitabji$ exiftool -a /Users/dkitabji/Dropbox/test-ORIGINAL.mov | grep 'Date' | sort | uniq
Create Date : 2016:12:11 22:37:57
Creation Date : 2016:12:11 17:37:56-05:00
Creation Date (und-US) : 2016:12:11 17:37:56-05:00
File Access Date/Time : 2016:12:12 20:04:00-05:00
File Inode Change Date/Time : 2016:12:12 19:27:28-05:00
File Modification Date/Time : 2006:10:21 20:16:00-04:00
Media Create Date : 2016:12:11 22:37:57
Media Modify Date : 2016:12:11 22:39:34
Modify Date : 2016:12:11 22:39:34
Track Create Date : 2016:12:11 22:37:57
Track Modify Date : 2016:12:11 22:39:34
completely ruining my ability to chronologically track my many video clips. However, you can see the correct historical date captured in "File Modification Date/Time".
So, I was hoping ExifTool would help me fix this (I made a copy of the .mov file first):
Daves-MBP:~ dkitabji$ exiftool '-CreationDate<FileModifyDate' /Users/dkitabji/Dropbox/test-MODIFIED.mov
1 image files updated
Daves-MBP:~ dkitabji$ exiftool -a /Users/dkitabji/Dropbox/test-MODIFIED.mov | grep 'Date' | sort | uniq
Create Date : 2016:12:11 22:37:57
Creation Date : 2006:10:21 20:16:00-04:00
Creation Date (und-US) : 2016:12:11 17:37:56-05:00
File Access Date/Time : 2016:12:12 23:01:25-05:00
File Inode Change Date/Time : 2016:12:12 23:01:06-05:00
File Modification Date/Time : 2016:12:12 23:01:06-05:00
Media Create Date : 2016:12:11 22:37:57
Media Modify Date : 2016:12:11 22:39:34
Modify Date : 2016:12:11 22:39:34
Track Create Date : 2016:12:11 22:37:57
Track Modify Date : 2016:12:11 22:39:34
Sure enough, the Creation Date now has the actual recording date (though, presumably because I just performed a filesystem operation, the actual File Modification Date/Time which originally captured that value, has now been overwritten).
Sadly, though, importing this newly-modified .mov into Photos leaves Photos still thinking the recording took place at 2016:12:11 17:37:56.
When I look at the above metadata dump, the only place left still showing that value is an attribute "Creation Date (und-US)". Is there any way to change that attribute?
Or am I barking up the wrong tree?
At the risk of looking stupid, hopefully I'm missing something simple. But your help is greatly appreciated!
Dave
File modification datetime is always one of the worst date fields to use as it changes each time you touch the file. In your exiftool change step, you can preserve it by using the -P option, but as you found it probably isn't the tag that is used by photos anyway.
The likeliest tag is, I think, the media create date. It depends on the format of the file, whether or not you can change it with exiftool. If not, I could look into extending my matchDateTime (https://github.com/HayoBaan/matchDateTime) script to cater for your situation. Just send me an email with a small sample file and I will have a look.
I don't know the (und-US) version of the datetime but if you want to know the tag name you could use to change it, add -s to exiftool, that will show you the name of the tag instead of a description.
Can I suggest that the first think you do after the Lifeflix stage is to preserve the date into the file itself rather than just on the filesystem. .mov files can contain xmp tags so I would copy the correct date from creation date (or modification date) to xmp:datetimeoriginal.
This probably won't solve the photo application problem but your will have preserved the date.
Quote from: Hayo Baan on December 13, 2016, 01:48:05 AM
File modification datetime is always one of the worst date fields to use as it changes each time you touch the file.
Agreed. I'm in conversation with the LifeFlix developer with some feedback, but not sure how likely that is to change.
Quote from: Hayo Baan on December 13, 2016, 01:48:05 AM
In your exiftool change step, you can preserve it by using the -P option, but as you found it probably isn't the tag that is used by photos anyway.
Aha, good tip. Thanks! Correct that it won't solve my problem, but that will definitely be a good practice.
Quote from: Hayo Baan on December 13, 2016, 01:48:05 AM
The likeliest tag is, I think, the media create date. It depends on the format of the file, whether or not you can change it with exiftool. If not, I could look into extending my matchDateTime (https://github.com/HayoBaan/matchDateTime) script to cater for your situation. Just send me an email with a small sample file and I will have a look.
Well thanks, I had already tried both the Media* and Track* attributes, using ExifTool to change them to the right value, but none of them affected Photos view of the footage date.
Quote from: Hayo Baan on December 13, 2016, 01:48:05 AM
I don't know the (und-US) version of the datetime but if you want to know the tag name you could use to change it, add -s to exiftool, that will show you the name of the tag instead of a description.
Aha, thanks. Another thing I was trying to find. So I tried to change that tag:
Daves-MBP:~ dkitabji$ exiftool '-CreationDate-und-US<CreationDate' /Users/dkitabji/Dropbox/test-MODIFIED.mov
Warning: Tag 'creationdate' does not support alternate languages - /Users/dkitabji/Dropbox/test-MODIFIED.mov
Warning: No writable tags set from /Users/dkitabji/Dropbox/test-MODIFIED.mov
0 image files updated
1 image files unchanged
So I'm concluding from this reply from Phil that this means I can't edit this tag:
https://exiftool.org/forum/index.php?topic=5511.0
So this would appear to leave me with no idea of how to proceed. Any ideas??
Quote from: Alan Clifford on December 13, 2016, 08:14:17 AM
Can I suggest that the first think you do after the Lifeflix stage is to preserve the date into the file itself rather than just on the filesystem. .mov files can contain xmp tags so I would copy the correct date from creation date (or modification date) to xmp:datetimeoriginal.
This probably won't solve the photo application problem but your will have preserved the date.
Thanks, Alan. This sounds like an excellent practice.
Quote from: reggoboy on December 13, 2016, 09:42:03 PM
Quote from: Hayo Baan on December 13, 2016, 01:48:05 AM
File modification datetime is always one of the worst date fields to use as it changes each time you touch the file.
Agreed. I'm in conversation with the LifeFlix developer with some feedback, but not sure how likely that is to change.
Let's hope they are willing to change this (note: this is why there are e.g. datetimeoriginal and datatimedigitized tags).
Quote from: reggoboy on December 13, 2016, 09:42:03 PM
Quote from: Hayo Baan on December 13, 2016, 01:48:05 AM
In your exiftool change step, you can preserve it by using the -P option, but as you found it probably isn't the tag that is used by photos anyway.
Aha, good tip. Thanks! Correct that it won't solve my problem, but that will definitely be a good practice.
Quote from: Hayo Baan on December 13, 2016, 01:48:05 AM
The likeliest tag is, I think, the media create date. It depends on the format of the file, whether or not you can change it with exiftool. If not, I could look into extending my matchDateTime (https://github.com/HayoBaan/matchDateTime) script to cater for your situation. Just send me an email with a small sample file and I will have a look.
Well thanks, I had already tried both the Media* and Track* attributes, using ExifTool to change them to the right value, but none of them affected Photos view of the footage date.
Hmm, I need to look into this and try to figure out what tag they are using. Can you send me a small sample movie?
Quote from: reggoboy on December 13, 2016, 09:42:03 PM
Quote from: Hayo Baan on December 13, 2016, 01:48:05 AM
I don't know the (und-US) version of the datetime but if you want to know the tag name you could use to change it, add -s to exiftool, that will show you the name of the tag instead of a description.
Aha, thanks. Another thing I was trying to find. So I tried to change that tag:
Daves-MBP:~ dkitabji$ exiftool '-CreationDate-und-US<CreationDate' /Users/dkitabji/Dropbox/test-MODIFIED.mov
Warning: Tag 'creationdate' does not support alternate languages - /Users/dkitabji/Dropbox/test-MODIFIED.mov
Warning: No writable tags set from /Users/dkitabji/Dropbox/test-MODIFIED.mov
0 image files updated
1 image files unchanged
So I'm concluding from this reply from Phil that this means I can't edit this tag:
https://exiftool.org/forum/index.php?topic=5511.0
So this would appear to leave me with no idea of how to proceed. Any ideas??
Looks indeed like exiftool is not yet able to write these CreationDate-und-US like tags. If this is indeed the tag that needs to be changed, I might be able to alter my matchDateTime (https://github.com/HayoBaan/matchDateTime) script to allow updating it. If you can send me a sample, I'll sure have a look.
Thanks, Hayo.
I PM'd you a Dropbox link to a small video file with the same properties as the one discussed so far.
I'll be very interested to see what you discover!
Meanwhile, where can I learn/read what "CreationDate-und-US" really represents and how, e.g., it differs from "CreationDate" and "CreateDate", which I have all of?
I will add a few more notes:
1) Photos is clearly using QuickTime:CreationDate-und-US since that is the only tag on the file prior to import matching the Date/Time shown in the clip's properties after import to Photos
2) ExifTool will not allow me to modify QuickTime:CreationDate-und-US, nor to delete it, nor even to delete the entire QuickTime group.
3) I thought maybe I could fool Photos by creating an XMP:CreationDate-und-US tag and putting the correct date in there, but ExifTool doesn't permit that
I feel that I know how to fix the problem, I just don't have the tool to get the job done.
Hayo, I will wait for you! Thanks!
I had a look at the file you sent me and did some digging and playing around with Photos (I don't use that application myself). After some playing I found out where Photos takes the date from: Photos takes the date from the "Birth" date of the file (aka. the file creation date).
To be honest this is too ridiculous to be true, but it is. First of all, that date does not get shown in Finder, nor with any "normal" command-line tools (e.g. ls). Moreover there is no good and reliable way to set that date, and to make things even worse, if you create a copy of the file, the "Birth" time normally gets set to the current time. A real mess!
To get the Birth time of a file you need to use the stat command. With just files as arguments the stat command gives you a whole bunch of file info, including four (!) different types of file dates (access, modification, inode change, birth). You can specify the output format of the stat command quite flexibly, e.g. to just get the birth date and the name of the file, use stat -f "%SB %N" FILES.
You can change the file's birth time using the touch command to change the file's modification date. If you use this command to set a modification time in the past, the birth time gets set as well (the reasoning being that you can not modify a file before it exists). As touch uses a different datetime format than is usually used by exiftool, you need to have exiftool show the date in a different format in order to be able to use it directly (-d "%Y%m%d%H%M.%S" gives the right format).
Use touch -t YYYYMMDDhhmm.ss FILE to set the file modification date (and the birth time, if it is a date in the past).
So, to solve your problem with Photos showing the wrong dates you need to set the file's birth time to the correct date/time. On top of that I would strongly suggest also setting the creation date in the metadata of the file (QuickTime:CreateDate and QuickTime:CreationDate seems most logical to me). If you have the date set this way, you can always fall back to these dates and reset the birth time of your files as outlined above. The following will do this automatically:
for f in *.mov; do touch -t `exiftool -T -d "%Y%m%d%H%M.%S" -CreationDate "$f"` "$f"; done
Note: you may also want to use "-API QuickTimeUTC" to tell exiftool that the quicktime datetimes are in UTC, not local time (not necessary for CreationDate as that already has timezone information).
Hi Hayo
Quote from: Hayo Baan on December 15, 2016, 04:04:48 AM
To be honest this is too ridiculous to be true, but it is. First of all, that date does not get shown in Finder, nor with any "normal" command-line tools (e.g. ls). Moreover there is no good and reliable way to set that date, and to make things even worse, if you create a copy of the file, the "Birth" time normally gets set to the current time. A real mess!
I've just spent half an hour playing about with stat and touch (decided not to go play golf today anyway)!
ls -lTU filename
will give you the create date
In finder, you can show "the date created"
After a final "touch" to update everything except the create date, I get
egremont:temp alan$ touch ahc_7957.jpg
egremont:temp alan$ stat -t "%n%F %T" ahc_7957.jpg
16777220 4347211 -rw-r--r-- 1 alan staff 0 134442 "
2016-12-15 11:42:51" "
2016-12-15 11:42:50" "
2016-12-15 11:42:50" "
2016-02-02 02:02:00" 4096 264 0 ahc_7957.jpg
egremont:temp alan$ ls -lTU ahc_7957.jpg
-rw-r--r--@ 1 alan staff 134442 2 Feb 02:02:00 2016 ahc_7957.jpg
egremont:temp alan$
and the February date shows up in Finder under "Date Created".
Quote from: Alan Clifford on December 15, 2016, 10:52:42 AM
Hi Hayo
Quote from: Hayo Baan on December 15, 2016, 04:04:48 AM
To be honest this is too ridiculous to be true, but it is. First of all, that date does not get shown in Finder, nor with any "normal" command-line tools (e.g. ls). Moreover there is no good and reliable way to set that date, and to make things even worse, if you create a copy of the file, the "Birth" time normally gets set to the current time. A real mess!
I've just spent half an hour playing about with stat and touch (decided not to go play golf today anyway)!
ls -lTU filename
will give you the create date
In finder, you can show "the date created"
Ah, Alan, good to know, I somehow overlooked the fact that you could use
-U to get the creation date with
ls. Good find! But I think you do agree using the creation date is still quite ridiculous, especially since e.g. movie files contain metadata that is much more applicable... (I was actually surprised that even with a file from an iPhone it uses the create date and not the metadata :o)
Quote from: Hayo Baan on December 15, 2016, 11:53:28 AM
But I think you do agree using the creation date is still quite ridiculous.
I do agree. The creation date relates to a particular instance of the file on a single file system rather than to the file itself.
I had demonstrated "ls -lU" in my original post ;-)
Quote from: reggoboy on December 15, 2016, 06:54:00 PM
I had demonstrated "ls -lU" in my original post ;-)
That was too far back in the thread! :-)
First of all, thanks a TON to you guys for all your input and time spent on this so far.
Now, for some questions.
Are you guys working on Macs like me? Because your command line syntax and the resulting output and results seems quite different than mine. In particular, let me show you how Hayo's clever suggestion worked for me:
(Note that I'm now using a much smaller file in this post with different dates, but otherwise the same issues as previously)
Daves-MBP:DV dkitabji$ stat -x small-MODIFIED.mov
File: "small-MODIFIED.mov"
Size: 22149457 FileType: Regular File
Mode: (0644/-rw-r--r--) Uid: ( 501/dkitabji) Gid: ( 20/ staff)
Device: 1,4 Inode: 2634297 Links: 1
Access: Wed Dec 14 23:48:41 2016
Modify: Thu Nov 30 13:42:00 2006
Change: Wed Dec 14 23:46:17 2016
(note the -x to get Linux style multi-line output). Note also the Modify date set in the past, the way this thread started. Finally, note that there's no Birth/Create date listed here.
Next I confirmed that the exiftool portion of Hayo's command would give us the the historic date output as expected, and that looks good:
Daves-MBP:DV dkitabji$ exiftool -T -d "%Y%m%d%H%M.%S" -CreationDate small-MODIFIED.mov
200611301342.00
Next, I tried Hayo's touch command on just this one file:
Daves-MBP:DV dkitabji$ touch -t `exiftool -T -d "%Y%m%d%H%M.%S" -CreationDate "small-MODIFIED.mov"` "small-MODIFIED.mov"
Daves-MBP:DV dkitabji$ stat -x small-MODIFIED.mov
File: "small-MODIFIED.mov"
Size: 22149457 FileType: Regular File
Mode: (0644/-rw-r--r--) Uid: ( 501/dkitabji) Gid: ( 20/ staff)
Device: 1,4 Inode: 2634297 Links: 1
Access: Thu Dec 15 19:06:21 2016
Modify: Thu Nov 30 13:42:00 2006
Change: Thu Dec 15 19:06:20 2016
But since there's no Birth/CreateDate displayed, everything looks the same as before. But both the following commands show our understanding of file creation date set to the proper historic value:
Daves-MBP:DV dkitabji$ stat -f "%SB %N" small-MODIFIED.mov
Nov 30 13:42:00 2006 small-MODIFIED.mov
Daves-MBP:DV dkitabji$ ls -lU small-MODIFIED.mov
-rw-r--r--@ 1 dkitabji staff 22149457 Nov 30 2006 small-MODIFIED.mov
But then recall from my original post that ls -U showed this historic date back then, too (though I don't remember what stat said).
And so then I dragged the clip into Photos, and sure enough, I get the same result as before: Photos sees the date as CreationDate-und-US: 2016:12:11 17:37:56:
Daves-MBP:DV dkitabji$ exiftool -a -G -s small-MODIFIED.mov | grep 'Date' | sort | uniq
[File] FileAccessDate : 2016:12:15 20:06:29-05:00
[File] FileInodeChangeDate : 2016:12:15 19:06:20-05:00
[File] FileModifyDate : 2006:11:30 13:42:00-05:00
[QuickTime] CreateDate : 2016:12:11 22:49:02
[QuickTime] CreationDate-und-US : 2016:12:11 17:37:56-05:00
[QuickTime] MediaCreateDate : 2016:12:11 22:49:02
[QuickTime] MediaModifyDate : 2016:12:11 22:49:08
[QuickTime] ModifyDate : 2016:12:11 22:49:08
[QuickTime] TrackCreateDate : 2016:12:11 22:49:02
[QuickTime] TrackModifyDate : 2016:12:11 22:49:08
[XMP] CreationDate : 2006:11:30 13:42:00-05:00
[XMP] DateTimeOriginal : 2006:11:30 13:42:00-05:00
So I'm curious, Hayo, what OS are you working on? I'm on macOS Sierra 10.12.1. I'm trying to figure out why your results differ from what I'm seeing? It still seems like I need to find a way to modify QuickTime:CreationDate-und-US in order to have hope here.
Thoughts??
Thanks!
I don't know how Phil retains his sanity dealing with this stuff. Googling around I found https://developer.apple.com/library/content/documentation/QuickTime/QTFF/Metadata/Metadata.html which has this sentence, "Similarly if the metadata writer does not want to limit the user's language (this is not recommended) it uses the value 'und' (undetermined) from the ISO 639-2/T specification."
So the tag appears to be for Americans who speak any language and it is not a recommended use. Just curious, did "Photos" create that tag?
Interesting. I'm on Mac too (Photos is a Mac only application so I figured you'd be on Mac too ;)). Yesterday when I tested things for you, I did everything on a 10.11 system, I'm now repeating some of the tests on a 10.12 system and the results are slightly different.
Note: don't use stat -x as it will NOT give you the birth time. My guess is that to keep things compatible with older versions, the output does not show the birth date (birth date is a relative new thing and not all file systems support it). Use either stat without options or e.g. stat -f "%SB %N" to get it.
On 10.12 it looks as if Photos behaves different and seems to be using the (und-US) date indeed. Over the weekend I will have a look at tweaking my matchdatetime script to cater for adjusting this tag.
Note: I played with Photos a little bit (man, what a piece of junk...) and I found out you can actually change the date of a movie. The bad news, however, is that that change is not reflected in the file, only in the Photos database :o. Not really useful, I think.
Quote from: Hayo Baan on December 16, 2016, 02:41:24 AM
Interesting. I'm on Mac too (Photos is a Mac only application so I figured you'd be on Mac too ;)). Yesterday when I tested things for you, I did everything on a 10.11 system, I'm now repeating some of the tests on a 10.12 system and the results are slightly different.
Yea, I figured at least your Photos use was on the Mac, but I thought maybe you were "Unixing around" on some other system ;-)
Quote from: Hayo Baan on December 16, 2016, 02:41:24 AM
Note: don't use stat -x as it will NOT give you the birth time. My guess is that to keep things compatible with older versions, the output does not show the birth date (birth date is a relative new thing and not all file systems support it). Use either stat without options or e.g. stat -f "%SB %N" to get it.
Aha, good catch. I just assumed what looked like the long form would have everything. Also, I did reading up on Birth date the other day when you first mentioned it since I didn't remember it at all in spite of being around unix for decades. I feel like I remember "creation date" support forever in Mac OS X and Unix (BSD, System V), and what I'm reading may be suggesting that it's just Linux that chose not to implement it because it wasn't required by POSIX? Anyway, it seems basic, and I'm a bit appalled that it was ever not standard everywhere even though, for movie tagging and this thread, it's not really something we want it using anyway ;-)
Quote from: Hayo Baan on December 16, 2016, 02:41:24 AM
On 10.12 it looks as if Photos behaves different and seems to be using the (und-US) date indeed. Over the weekend I will have a look at tweaking my matchdatetime script to cater for adjusting this tag.
Aha, now we're on the same page! Thanks. I found the web page and I'm going to read up on your script:
https://github.com/HayoBaan/matchDateTime
Quote from: Hayo Baan on December 16, 2016, 02:41:24 AM
Note: I played with Photos a little bit (man, what a piece of junk...) and I found out you can actually change the date of a movie. The bad news, however, is that that change is not reflected in the file, only in the Photos database :o. Not really useful, I think.
Yes, you can change it from the GUI. I had tried early on to then EXPORT the modified movie OUT of Photos, in an effort to find out what tag Photos was really using. I was appalled to find that the exported movie didn't reflect the newly edited date value! Amazing. And so I figured that Photos is storing that metadata in its library somewhere, and so I didn't even bother to try to disassemble the library and find the underlying video and check it's stamp. My feeling is that once it's in that Apple Photos Library, all that data is "managed" and altering it there is too risky. Hence our current goal of scrubbing the file PRIOR to import. iTunes works a similar way for songs: some of the data is tagged within the .mp3 or otherwise files themselves, but other metadata is managed in "the library". A blessing and a curse.
Looking forward to Hayo's modified script!
I've updated my matchDateTime (https://github.com/HayoBaan/matchDateTime) script and it now also updates the QuickTime CreationDate tags with the value of the QuickTime CreateDate tag. By default it keeps the TimeZone as was set in the CreationDate tag, but you can override this with the -tz option.
Hope it works well for you!
I just updated the script again and added an option for interpreting QuickTime times as UTC (which is how e.g. iPhone movies are recorded).
Quote from: Hayo Baan on December 17, 2016, 06:31:54 AM
I've updated my matchDateTime (https://github.com/HayoBaan/matchDateTime) script and it now also updates the QuickTime CreationDate tags with the value of the QuickTime CreateDate tag. By default it keeps the TimeZone as was set in the CreationDate tag, but you can override this with the -tz option.
Hope it works well for you!
So!
I ran it and it seems to not have some attributes that it's expecting.
Daves-MBP:DV dkitabji$ ~/matchDateTime
Usage:
matchDateTime [-recurse] [-overwrite] [utc] [-tz TZ [-dst]] <Files>
Daves-MBP:DV dkitabji$ exiftool -a -G -s small-MODIFIED.mov | grep 'Date' | sort | uniq
[File] FileAccessDate : 2016:12:15 20:06:29-05:00
[File] FileInodeChangeDate : 2016:12:15 19:06:20-05:00
[File] FileModifyDate : 2006:11:30 13:42:00-05:00
[QuickTime] CreateDate : 2016:12:11 22:49:02
[QuickTime] CreationDate-und-US : 2016:12:11 17:37:56-05:00
[QuickTime] MediaCreateDate : 2016:12:11 22:49:02
[QuickTime] MediaModifyDate : 2016:12:11 22:49:08
[QuickTime] ModifyDate : 2016:12:11 22:49:08
[QuickTime] TrackCreateDate : 2016:12:11 22:49:02
[QuickTime] TrackModifyDate : 2016:12:11 22:49:08
[XMP] CreationDate : 2006:11:30 13:42:00-05:00
[XMP] DateTimeOriginal : 2006:11:30 13:42:00-05:00
Daves-MBP:DV dkitabji$ ~/matchDateTime small-MODIFIED.mov
Skipped: Unable to find MakerNotes DateTimeOriginal or Creation Date in small-MODIFIED.mov
Do I need to use ExifTool to copy File:FileModifyDate -> something intermediate before matchDateTime will be able to put it to where I need it, QuickTime:CreationDate-und-US?
I see, this is a modified file where you tried to change the CreationDate yourself already. I noticed that if you do that with exiftool, it removes/hides it from the QuickTime group and places it in the XMP group. The format of the XMP tag is different from the QuickTime version so I can't use it. I will adapt my script so it will also use the language variants of the tag (I initially thought about doing that already but decided against it as it would be somewhat more error prone).
Also note that as explained in the documentation, matchDateTime will take the QuickTime createdate as date. So in your case you'd first need to use exiftool to set the QuickTime createdate to the file modification date. Then, when you run matchDateTime, it will set everything as you want. If you need/want to change the timezone as well, you can specify it with the -tz option. Also, if you know the QuickTime times to be in UTC (not all cameras do, but e.g. an iPhone does), make sure you use -api QuickTimeUTC on your exiftool command and -utc on matchDateTime.
Cheers
Hayo
P.S. I will also think about adding an option so matchDateTime will use the file modification time instead of CreateDate.
matchDateTime (https://github.com/HayoBaan/matchDateTime) now explicitly checks (and updates) the language variants of the CreationDate tag as well. You can furthermore specify to use the file modification time instead of the CreateDate (use the -modtime option).
Note: matchDateTime will not update the XMP version of CreationDate (nor any other datetime tags) that you (accidentally) created. You will still need to use exiftool for that. I actually suggest you remove the XMP version altogether. Note that if you do that, you (magically) get the QuickTime version back. I'm not sure how this is possible (@Phil?), but it's what happens ;D
Holy heck, I think we have success!!
First of all, you are correct, Hayo, that I mistakenly started with a clip that I had already "played with", so I wasn't starting with a clean slate. That was my oversight ;-)
So I went back to the original clip, and here's what I did to get it to work:
Daves-MBP:DV dkitabji$ exiftool -a -G -s small-MODIFIED.mov | grep 'Date' | sort | uniq
[File] FileAccessDate : 2016:12:18 12:16:19-05:00
[File] FileInodeChangeDate : 2016:12:18 12:16:13-05:00
[File] FileModifyDate : 2006:11:30 13:42:00-05:00
[QuickTime] CreateDate : 2016:12:11 22:49:02
[QuickTime] CreationDate : 2016:12:11 17:37:56-05:00
[QuickTime] CreationDate-und-US : 2016:12:11 17:37:56-05:00
[QuickTime] MediaCreateDate : 2016:12:11 22:49:02
[QuickTime] MediaModifyDate : 2016:12:11 22:49:08
[QuickTime] ModifyDate : 2016:12:11 22:49:08
[QuickTime] TrackCreateDate : 2016:12:11 22:49:02
[QuickTime] TrackModifyDate : 2016:12:11 22:49:08
Daves-MBP:DV dkitabji$ exiftool -P '-QuickTime:CreateDate<File:FileModifyDate' ./small-MODIFIED.mov
1 image files updated
Daves-MBP:DV dkitabji$ exiftool -a -G -s small-MODIFIED.mov | grep 'Date' | sort | uniq
[File] FileAccessDate : 2016:12:18 12:17:15-05:00
[File] FileInodeChangeDate : 2016:12:18 12:17:11-05:00
[File] FileModifyDate : 2006:11:30 13:42:00-05:00
[QuickTime] CreateDate : 2006:11:30 13:42:00
[QuickTime] CreationDate : 2016:12:11 17:37:56-05:00
[QuickTime] CreationDate-und-US : 2016:12:11 17:37:56-05:00
[QuickTime] MediaCreateDate : 2016:12:11 22:49:02
[QuickTime] MediaModifyDate : 2016:12:11 22:49:08
[QuickTime] ModifyDate : 2016:12:11 22:49:08
[QuickTime] TrackCreateDate : 2016:12:11 22:49:02
[QuickTime] TrackModifyDate : 2016:12:11 22:49:08
Daves-MBP:DV dkitabji$ ~/matchDateTime small-MODIFIED.mov
Updated CreationDate 2016-12-11T17:37:56-0500 => 2006-11-30T13:42:00-0500 in small-MODIFIED.mov (1 times)
OK: Changed date 1 times in small-MODIFIED.mov
Daves-MBP:DV dkitabji$ exiftool -a -G -s small-MODIFIED.mov | grep 'Date' | sort | uniq
[File] FileAccessDate : 2016:12:18 12:18:43-05:00
[File] FileInodeChangeDate : 2016:12:18 12:18:43-05:00
[File] FileModifyDate : 2006:11:30 13:42:00-05:00
[QuickTime] CreateDate : 2006:11:30 13:42:00
[QuickTime] CreationDate : 2006:11:30 13:42:00-05:00
[QuickTime] CreationDate-und-US : 2006:11:30 13:42:00-05:00
[QuickTime] MediaCreateDate : 2016:12:11 22:49:02
[QuickTime] MediaModifyDate : 2016:12:11 22:49:08
[QuickTime] ModifyDate : 2016:12:11 22:49:08
[QuickTime] TrackCreateDate : 2016:12:11 22:49:02
[QuickTime] TrackModifyDate : 2016:12:11 22:49:08
And sure enough, when I import this newly-modified clip into Apple Photos, Photos sees it as taken 2006:11:30 13:42:00.
So happy to have this working! And what a pain that all these software apps put us through all this hassle just to have things "work right"!
So Hayo, you nailed it and are truly the man. I wonder if Phil (the other man ;-) would consider building your product into ExifTool? Why not have all this functionality in one place?
Anyway, thanks so much to all of you. What an adventure! If other matters come up, you'll be the first to hear from me! And I hope this detailed thread benefits someone else :-)
Quote from: reggoboy on December 18, 2016, 12:38:51 PM
Holy heck, I think we have success!!
First of all, you are correct, Hayo, that I mistakenly started with a clip that I had already "played with", so I wasn't starting with a clean slate. That was my oversight ;-)
Great! Good to hear.
And your "mistake" actually made the script better; the localised dates could be different for some people/circumstances, so explicitly checking them is better, plus it takes care of the situation where the original CreationDate got hidden by exiftool.
Quote from: reggoboy on December 18, 2016, 12:38:51 PM
So happy to have this working! And what a pain that all these software apps put us through all this hassle just to have things "work right"!
So Hayo, you nailed it and are truly the man. I wonder if Phil (the other man ;-) would consider building your product into ExifTool? Why not have all this functionality in one place?
It would be nice, of course, if this could be integrated into exiftool but I think this might require quite some (re)work in exiftool given the way changes to the metadata are handled there. In a way my approach is quite simplistic: I just look for byte sequences/strings that match a certain pattern (a date in this case) and then overwrite it with what we want there. Phil basically rebuilds the whole file from scratch using the metadata and image data as building block. That process is sometimes (too) complex/error prone for some of the structures so he leaves them alone. In case of these QuickTime tags, however, I think it might be possible for Phil to allow writing them without having to rework his approach.
Quote from: reggoboy on December 18, 2016, 12:38:51 PM
Anyway, thanks so much to all of you. What an adventure! If other matters come up, you'll be the first to hear from me! And I hope this detailed thread benefits someone else :-)
It was fun to work on the script again, plus these additions make it more useful to others than before too.
Cheers,
Hayo
P.S. I had thought about having matchDateTime also automatically update e.g. createDate if you used the file modification time but in the end I decided against that as then there are so many other date tags we might need to consider updating too (Media and Track dates for instance). What do you think?
*** Edit: never mind, I realized that I didn't need to use the matchDateTime tool because my file doesn't have a CreationDate-und-US attribute. I added the files to Photos and they show up with the corrected date.
Hello, I've been going crazy with this very problem.
Why don't video have a standard date creation system?
Anyhow, I followed the last posting by @reggoboy but when I get to the last step using the matchDateTime tool, I get and error that the expected MakerNotes cannot be found in the file. I see CreateDate, so not sure what's it saying.
What am I doing wrong?
-skipR
MacBook-Pro:~ skippingrock$ exiftool -a -G -s /Users/skippingrock/Movies/New\ Folder\ With\ Items/20160728_025628.mov | grep 'Date' | sort | uniq
[File] FileAccessDate : 2017:01:08 19:15:56-08:00
[File] FileInodeChangeDate : 2017:01:08 19:13:49-08:00
[File] FileModifyDate : 2016:07:27 19:57:10-07:00
[QuickTime] CreateDate : 2016:07:27 19:57:10
[QuickTime] MediaCreateDate : 2017:01:09 00:04:28
[QuickTime] MediaModifyDate : 2017:01:09 00:04:45
[QuickTime] ModifyDate : 2017:01:09 00:04:45
[QuickTime] TrackCreateDate : 2017:01:09 00:04:28
[QuickTime] TrackModifyDate : 2017:01:09 00:04:45
MacBook-Pro:~ skippingrock $ /Users/skippingrock/bin/matchDateTime /Users/skippingrock/Movies/New\ Folder\ With\ Items/20160728_025628.mov
Skipped: Unable to find MakerNotes DateTimeOriginal or Creation Date in /Users/skippingrock/Movies/New Folder With Items/20160728_025628.mov
MacBook-Pro:~ skippingrock $
P.S. thank-you for coming out with these tools!
Yep, in your case you don't need MatchDateTime as all the dates in your file are in fact editable by exiftool already.
Okay, so I have an update!
Recall from my last post that I had come up with a working workflow to get footage dates ripped out of the raw DV footage and all the way into Apple Photos:
MiniDV Cassette -> LifeFlix -> *.mov files -> ExifTool ('-QuickTime:CreateDate<File:FileModifyDate') -> matchDateTime -> Apple Photos
So I finally just got back on track ripping tapes using this workflow. But I forgot the matchDateTime step, AND IT WORKED FINE ANYWAY! In Photos, the clips sorted properly by date.
So what the heck happened?
When I inspect the new clips freshly ripped via LifeFlix, I see this:
Daves-Mac-mini:Scenes dkitabji$ exiftool -a -G -s "16-AJ 6-7mos - 3_h264.mov" | grep 'Date' | sort | uniq
[File] FileAccessDate : 2002:05:03 00:34:00-04:00
[File] FileInodeChangeDate : 2017:02:01 22:05:24-05:00
[File] FileModifyDate : 2002:05:03 00:34:00-04:00
[QuickTime] ContentCreateDate : 2017:02:01 22:03:04-05:00
[QuickTime] CreateDate : 2017:02:02 03:05:10
[QuickTime] MediaCreateDate : 2017:02:02 03:05:10
[QuickTime] MediaModifyDate : 2017:02:02 03:05:24
[QuickTime] ModifyDate : 2017:02:02 03:05:24
[QuickTime] TrackCreateDate : 2017:02:02 03:05:10
[QuickTime] TrackModifyDate : 2017:02:02 03:05:24
Things have changed!
1. File:FileAccessDate now matches File:FileModifyDate, both showing the original footage date.
2. There's a new QuickTime:ContentCreateDate
3. But probably most noteworthy, the troublesome Quicktime:CreationDate-und-US is GONE.
The CreationDate-und-US, recall, is what Photos was using to sort by and which exiftool could not fix (enter matchDateTime to save the day).
So it seems that now, with simply QuickTime:CreateDate fixed, Photos is working fine.
But when I inspect a file that was ripped back during my earlier posts, it still shows Quicktime:CreationDate-und-US:
Daves-Mac-mini:DV dkitabji$ exiftool -a -G -s "test-ORIGINAL.mov" | grep 'Date' | sort | uniq
[File] FileAccessDate : 2016:12:15 20:43:21-05:00
[File] FileInodeChangeDate : 2016:12:14 22:08:21-05:00
[File] FileModifyDate : 2006:10:21 20:16:00-04:00
[QuickTime] CreateDate : 2016:12:11 22:37:57
[QuickTime] CreationDate : 2016:12:11 17:37:56-05:00
[QuickTime] CreationDate-und-US : 2016:12:11 17:37:56-05:00
[QuickTime] MediaCreateDate : 2016:12:11 22:37:57
[QuickTime] MediaModifyDate : 2016:12:11 22:39:34
[QuickTime] ModifyDate : 2016:12:11 22:39:34
[QuickTime] TrackCreateDate : 2016:12:11 22:37:57
[QuickTime] TrackModifyDate : 2016:12:11 22:39:34
SO WHAT CHANGED??
Well, LifeFlix has not been updated. I am, however, running macOS Sierra 10.12.2 now, not 10.12.1. That may have updated the Photos app or may have also updated the video encoding libraries in macOS. Maybe they saw my complaints and fixed it in the OS? Maybe the fault hasn't been with LifeFlix or exiftool for not handling this properly, but the OS itself?
And Hayo was kind enough to do those upgrades to matchDateTime, but they don't appear to be needed for my application at this time!
So my new, working workflow is:
MiniDV Cassette -> LifeFlix -> *.mov files -> ExifTool ('-QuickTime:CreateDate<File:FileModifyDate') -> Apple Photos
using:
exiftool -P '-QuickTime:CreateDate<File:FileModifyDate' <filename>
Curious what you think!
And I'm again hoping this is helpful for others out there!
DK
Hi DK,
Interesting! So your newer files no longer have a Quicktime:CreationDate or Quicktime:CreationDate-und-US?
I doubt very much that it's a change in Photos that caused this: as far as I know it doesn't alter the original files. Also, if your workflow is exactly as you described, there's nothing apart from lifeflix and exiftool touching the data before finding the CreationDate tags...
Hmm, I'm wondering if the data on the MiniDV Cassette perhaps contained the additional information (or at least caused it to be created)?
This should be easy to figure out: just re-rip an earlier tape.
(Note: instead of going through sort and uniq, why not simply ask exiftool for only the date tags e.g. like so: exiftool -a -G -s '-*Date' "16-AJ 6-7mos - 3_h264.mov")
Quote from: Hayo Baan on February 02, 2017, 05:34:12 AM
(Note: instead of going through sort and uniq, why not simply ask exiftool for only the date tags e.g. like so: exiftool -a -G -s '-*Date' "16-AJ 6-7mos - 3_h264.mov")
or like this:
exiftool -a -G -s -time:all "16-AJ 6-7mos - 3_h264.mov"- Phil
Quote from: Phil Harvey on February 02, 2017, 07:17:44 AM
or like this: exiftool -a -G -s -time:all "16-AJ 6-7mos - 3_h264.mov"
Yes, but that would include
all time related tags, not just the one ending in Date ;)
(which in this case could actually be more appropriate)
Yes it would. :)
- Phil
Quote from: Phil Harvey on February 02, 2017, 07:17:44 AM
Quote from: Hayo Baan on February 02, 2017, 05:34:12 AM
(Note: instead of going through sort and uniq, why not simply ask exiftool for only the date tags e.g. like so: exiftool -a -G -s '-*Date' "16-AJ 6-7mos - 3_h264.mov")
or like this: exiftool -a -G -s -time:all "16-AJ 6-7mos - 3_h264.mov"
- Phil
Aha, nice tip! I did not know about the "time" group! Thanks!
Dave