Creating New Tag names

Started by HardwareGuy, November 19, 2019, 09:01:32 PM

Previous topic - Next topic

HardwareGuy

I would like to add specific weather data to photos and it appears that custom tag names can be created but yet I have not been able to successfully do this yet.

I have tried several variations of the exiftool -wm cg ...... command but all I get is :
Warning: Tag 'XYZ' is not defined.

I thought that the metadata tags could be customized or point to a file that linked the data to the image file. In this case is a ,jpg file. I would prefer not to link but rather have the data contain in the tags/metadata of the image.

A push in the right direction would be appreciated, or if I have misread the capabilities of this amazing tool, please let me know and sorry for wasting everyone's time.

I have used the exiftool many other times to fix other metadata issues with photos.

TIA!


StarGeek

It sounds like you're misunderstanding the -wm (writemode) option.  It only controls if a tag that exiftool already knows is written to the file or not.  It does not create previously undefined tags.

Exiftool can write custom tags, but you have to create a definition for them first.  See the example.config file for details and look around on this forum for "user defined tags".  I would suggest adding your tags into the XMP name space, as it's overall easier to do.
* 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).

HardwareGuy

Thank you for the clarification and the suggested direction!

nico00152

How can I define a custom xmp tag with a nested structure?

Eg:

CustomXMP: {
    key1: value1,
    key2: value2,
    ...
}

Phil Harvey

This is a duplicate question, answered here.
...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 ($).