Conditions under which JPEG DateTimeOriginal field can be added to existing JPEG

Started by frank, January 10, 2020, 10:57:15 AM

Previous topic - Next topic

frank

Hi,

First of all thanks for writing this essential piece of software!

I have a question regarding adding DateTimeOriginal fields to JPEG files that do not already have an EXIF "section" (sorry not up-to-date with terminology here).

I seemed to remember that exiftool can only modify existing DateTimeOriginal timestamps and not create them from "nothing", but a customer has shown me a trick where he first adds an EXIF user comment and then afterwards successfully sets the DateTimeOriginal field. This works on a whole bunch of his files, but none of mine.. the request for being able to add DateTimeOriginal fields to any JPEG file is very frequent, so this sounds great but I'm not sure under what conditions this "trick" works possible and it seems like I'm missing something so I decided to go back to the source.. could you enlighten me?

Any help would be greatly appreciated.

Best regards,

Frank

Phil Harvey

Hi Frank,

Quote from: frank on January 10, 2020, 10:57:15 AM
I seemed to remember that exiftool can only modify existing DateTimeOriginal timestamps and not create them from "nothing"

No.  ExifTool has always been able to create tags in JPEG files.  No tricks are necessary.  At one time, it couldn't create new tags in MOV/MP4 videos, but it can do that now too.

A command would be:

exiftool -datetimeoriginal="2020:01:10 11:01:10" FILE

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