I am trying a compose a command that deletes all possible metadata from .mp4, .m4v and .mov.
'-All=' does not zero 'QuickTime:*Date' tags so they must be deleted separately. A test movie has these tags (G1:7 shows the details of some tags that with G1 might look like duplicates. Some app might prefer the other tag):
exiftool -a -G1 -s -n -api RequestAll=2 -fileOrder5 FileName -FileName -FileCreateDate -FileModifyDate -QuickTime:'*Date' -Keys:All -ItemList:All -UserData:All -XMP:All -api QuickTimeUTC=0 2006-0606-1206-06.mp4
[System] FileName : 2006-0606-1206-06.mp4
[MacOS] FileCreateDate : 2001:02:01 12:01:01+02:00
[System] FileModifyDate : 2002:02:02 12:02:02+02:00
[QuickTime] CreateDate : 2003:03:03 10:03:03
[QuickTime] ModifyDate : 2003:03:03 10:03:03
[Track1] TrackCreateDate : 2003:03:03 10:03:03
[Track1] TrackModifyDate : 2003:03:03 10:03:03
[Track1] MediaCreateDate : 2003:03:03 10:03:03
[Track1] MediaModifyDate : 2003:03:03 10:03:03
[Track2] TrackCreateDate : 2003:03:03 10:03:03
[Track2] TrackModifyDate : 2003:03:03 10:03:03
[Track2] MediaCreateDate : 2003:03:03 10:03:03
[Track2] MediaModifyDate : 2003:03:03 10:03:03
[Keys] CreationDate : 2005:05:05 12:05:05+02:00
[Keys] GPSCoordinates : -36.6101 -66.91515 119.9
[Keys] Author : Author Keys
[Keys] Description : Description Keys
[Keys] DisplayName : DisplayName Keys
[Keys] Keywords : Keywords 1 Keys,Keywords 2 Keys
[Keys] Title : Title Keys
[Keys] UserRating : 3
[Keys] LocationName : LocationName Keys
[ItemList] Author : Author ItemList:ID-auth
[ItemList] Keyword : Keyword 1 ItemList,Keyword 2 ItemList
[ItemList] Author : Author ItemList:ID-a9aut
[ItemList] Title : Title ItemList
[ItemList] GPSCoordinates : -36.6101 66.91515 119.9
[UserData] DateTimeOriginal : 2004:04:04 12:04:04+02:00
[UserData] GPSCoordinates : 36.6101 -66.91515 119.9
[UserData] Author : Author UserData
[UserData] ClipFileName : ClipFileName UserData
[UserData] Title : Title UserData:ID-titl
[UserData] Title : Title UserData:ID-a9nam
[UserData] UserRating : 2
[UserData] LocationInformation : 36.6101, 66.91515, 119.9 Role=shooting Lat=999.00000 Lon=999.00000 Alt=0.00 Body= Notes=
[XMP-x] XMPToolkit : Image::ExifTool 12.60
[XMP-iptcCore] Location : Location XMP-iptcCore
[XMP-iptcExt] Headline : Headline XMP-iptcExt
[XMP-dc] Subject : Subject 1 XMP-dc,Subject 2 XMP-dc
[XMP-dc] Title : Title XMP-dc
[XMP-mediapro] Location : Location XMP-mediapro
[XMP-photoshop] CaptionWriter : CaptionWriter XMP-photoshop
[XMP-photoshop] Headline : Headline XMP-photoshop
[XMP-xmp] Rating : 1
-> I am wondering why '-QuickTime:*Date*=' does not zero 'QuickTime:*Date' tags if it is before '-All=':
exiftool -overwrite_original -api LargeFileSupport=1 '-QuickTime:*Date*=' -All= 2006-0606-1206-06.mp4
exiftool -a -G1 -s -n -api RequestAll=2 -fileOrder5 FileName -FileName -FileCreateDate -FileModifyDate -QuickTime:'*Date' -Keys:All -ItemList:All -UserData:All -XMP:All -api QuickTimeUTC=0 2006-0606-1206-06.mp4
[System] FileName : 2006-0606-1206-06.mp4
[MacOS] FileCreateDate : 2023:05:05 10:16:41+03:00
[System] FileModifyDate : 2023:05:05 10:16:41+03:00
[QuickTime] CreateDate : 2003:03:03 10:03:03
[QuickTime] ModifyDate : 2003:03:03 10:03:03
[Track1] TrackCreateDate : 2003:03:03 10:03:03
[Track1] TrackModifyDate : 2003:03:03 10:03:03
[Track1] MediaCreateDate : 2003:03:03 10:03:03
[Track1] MediaModifyDate : 2003:03:03 10:03:03
[Track2] TrackCreateDate : 2003:03:03 10:03:03
[Track2] TrackModifyDate : 2003:03:03 10:03:03
[Track2] MediaCreateDate : 2003:03:03 10:03:03
[Track2] MediaModifyDate : 2003:03:03 10:03:03
But this does work:
exiftool -overwrite_original -api LargeFileSupport=1 -All= '-QuickTime:*Date*=' 2006-0606-1206-06.mp4
exiftool -a -G1 -s -n -api RequestAll=2 -fileOrder5 FileName -FileName -FileCreateDate -FileModifyDate -QuickTime:'*Date' -Keys:All -ItemList:All -UserData:All -XMP:All -api QuickTimeUTC=0 2006-0606-1206-06.mp4
[System] FileName : 2006-0606-1206-06.mp4
[MacOS] FileCreateDate : 2023:05:05 10:18:18+03:00
[System] FileModifyDate : 2023:05:05 10:18:18+03:00
[QuickTime] CreateDate : 0000:00:00 00:00:00
[QuickTime] ModifyDate : 0000:00:00 00:00:00
[Track1] TrackCreateDate : 0000:00:00 00:00:00
[Track1] TrackModifyDate : 0000:00:00 00:00:00
[Track1] MediaCreateDate : 0000:00:00 00:00:00
[Track1] MediaModifyDate : 0000:00:00 00:00:00
[Track2] TrackCreateDate : 0000:00:00 00:00:00
[Track2] TrackModifyDate : 0000:00:00 00:00:00
[Track2] MediaCreateDate : 0000:00:00 00:00:00
[Track2] MediaModifyDate : 0000:00:00 00:00:00
Why must '-QuickTime:*Date*=' be the last option here?
Test movies attached ('FileCreateDate=2001:02:01 12:01:01+02:00' date does not seem to survive zipping).
BTW for some strange reason in macOS 13 Ventura Spotlight metadata search fails with .m4v while .mp4 and .mov are OK. Spotlight search finds only 'ItemList:Title' tag in .m4v. Spotlight finds the Keys tags above in .mp4 and .mov. BUT if I just change the file suffix from .m4v to .mp4, THEN it works (.mp4 and .m4v are very much the same, .m4v only has some DRM options added).
Also Google Photos reads .mp4 'Keys:CreationDate' time zone somewhat differently compared to those other movie wrappers.
- Matti
'-QuickTime:*Date*=' deletes tags individually.
-all= is a group delete that overrides all previous arguments.
The tags in question can't actually be deleted, so they are unaffected by a group delete. But the logic to delete them individually has been patched to set them to zero instead, which is why '-QuickTime:*Date*=' has an effect.
- Phil
Quote from: Phil Harvey on May 05, 2023, 11:52:42 AM-all= is a group delete that overrides all previous arguments
Thanks for the explanation!
- Matti