ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: grole on July 14, 2024, 12:42:20 PM

Title: Overwrite QuickTime Time/Date
Post by: grole on July 14, 2024, 12:42:20 PM
I've got a few videos with the wrong time/date set from the camera. I've been able to shift the (windows?) modified date but they're still showing the original, which appear to be QuickTime values.

I found this similar thread but the command doesn't work for me: https://exiftool.org/forum/index.php?topic=13272.0

This is what an example file shows. The File date/time is corrected. So I would just want that copied to the relevant fields.

C:\Users\Administrator>exiftool -a -G0 -time:all e:\temp\shift
======== e:/temp/shift/2024-06-29_12-19-20-00_AKASO.MOV
[File]          File Modification Date/Time     : 2024:06:29 12:19:20+02:00
[QuickTime]     Create Date                     : 2022:01:01 12:09:33
[QuickTime]     Modify Date                     : 2022:01:01 12:09:33
[QuickTime]     Track Create Date               : 2022:01:01 12:09:33
[QuickTime]     Track Modify Date               : 2022:01:01 12:09:33
[QuickTime]     Media Create Date               : 2022:01:01 12:09:33
[QuickTime]     Media Modify Date               : 2022:01:01 12:09:33
[QuickTime]     Track Create Date               : 2022:01:01 12:09:33
[QuickTime]     Track Modify Date               : 2022:01:01 12:09:33
[QuickTime]     Media Create Date               : 2022:01:01 12:09:33
[QuickTime]     Media Modify Date               : 2022:01:01 12:09:33
    1 directories scanned
    1 image files read
Title: Re: Overwrite QuickTime Time/Date
Post by: StarGeek on July 14, 2024, 01:45:03 PM
Quote from: grole on July 14, 2024, 12:42:20 PMI found this similar thread but the command doesn't work for me:
https://exiftool.org/forum/index.php?topic=13272.0 (https://exiftool.org/forum/index.php?topic=13272.0)

What exactly "doesn't work"? What is the output from exiftool? Are you using exiftool to double check the time stamps or something else?

The command in my post (https://exiftool.org/forum/index.php?msg=71699) in that thread would (almost) be the correct one, as I would drop the hashtag #. I'm not sure why it's there or why I didn't remove it.

I would also add the -api QuickTimeUTC option (https://exiftool.org/ExifTool.html#QuickTimeUTC), as most Quicktime time stamps are supposed to be in UTC rather than local time. That option will correctly write the times as UTC.

exiftool -P -api QuickTimeUTC -wm w "-quicktime:time:all<$FileModifyDate" /path/to/files/

This command is for use under CMD, not Powershell. Powershell's quoting rules are different from every other command line. You can try changing the double quotes into single quotes to see if it works under Powershell.  Make sure you pay attention to the highlighting (https://exiftool.org/forum/index.php?msg=80581).

Title: Re: Overwrite QuickTime Time/Date
Post by: grole on July 17, 2024, 11:09:38 AM
Thanks for your answer and sorry for the late reply.

What I meant was that I get this error:

C:\Users\Administrator>exiftool -P -wm w "-quicktime:time:all#<$FileModifyDate" e:\temp\shift
Ignored superfluous tag name or invalid option: -wm
Warning: Error opening file - w
Error: File not found - w
    1 directories scanned
    0 image files updated
    1 files weren't updated due to errors

I tried your modified command and got this:

C:\Users\Administrator>exiftool -P -api QuickTimeUTC -wm w "-quicktime:time:all<$FileModifyDate" e:\temp\shift
Ignored superfluous tag names or invalid options: -api ...
Warning: Error opening file - QuickTimeUTC
Error: File not found - QuickTimeUTC
Warning: Error opening file - w
Error: File not found - w
    1 directories scanned
    0 image files updated
    2 files weren't updated due to errors

I am indeed using CMD. Sorry in advance for my ignorance in case I've put it in wrong.
Title: Re: Overwrite QuickTime Time/Date
Post by: StarGeek on July 17, 2024, 11:24:27 AM
I'm honestly stumped. I can't figure out how you would even get those messages.  I can copy/paste your commands and they work correctly here.  For some reason, the -api and -wm options are being treated as options, which shouldn't happen unless you're using a 10+ year old version of exiftool.
Title: Re: Overwrite QuickTime Time/Date
Post by: Phil Harvey on July 18, 2024, 08:08:07 PM
What version of ExifTool are you using?  (run exiftool -ver)

- Phil
Title: Re: Overwrite QuickTime Time/Date
Post by: grole on July 19, 2024, 09:36:09 AM
Sorry guys, indeed that was the problem. I was still using 10.37! I guess when software works, I don't bother updating it.

That command did the trick, thanks a lot!