Overwrite QuickTime Time/Date

Started by grole, July 14, 2024, 12:42:20 PM

Previous topic - Next topic

grole

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

StarGeek

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

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 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, 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.

* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

grole

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.

StarGeek

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.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Phil Harvey

What version of ExifTool are you using?  (run exiftool -ver)

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

grole

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!