ExifTool Forum

ExifTool => Newbies => Topic started by: Jom on January 30, 2022, 11:50:32 AM

Title: Mapping standard tags to ExifTool tags
Post by: Jom on January 30, 2022, 11:50:32 AM
Hello.
I haven't read the ExifTool documentation for a long time and forgot where I got the tag mapping from.
Please help me find tag mapping.
For example:

Exif | BodySerialNumber  -> exif:serialnumber
XMP  | xmp:Nickname      -> xmp-xmp:nickname
Title: Re: Mapping standard tags to ExifTool tags
Post by: StarGeek on January 30, 2022, 12:02:26 PM
Using the command in FAQ #3 (https://exiftool.org/faq.html#Q3) will show you the tag names and the groups they belong to.

The Tag Names pages (https://exiftool.org/TagNames) lists all the groups and tag names.
Title: Re: Mapping standard tags to ExifTool tags
Post by: Jom on January 30, 2022, 01:03:37 PM
Yes, I've looked at these pages, but it's the opposite for me - I don't extract tags from the image.
I take tags from the standards and then look for a match for them in ExifTool.
Title: Re: Mapping standard tags to ExifTool tags
Post by: StarGeek on January 30, 2022, 01:09:02 PM
In most cases, the name will be the same or really close.  In the case of EXIF, the notes column will show the changes.  For example, under SerialNumber, the note says "(called BodySerialNumber by the EXIF spec.)"

I don't see any similar notes under IPTC IIM and XMP is usually the same except in the case of some flattened tags, which are usually shorted to remove duplicated parts.
Title: Re: Mapping standard tags to ExifTool tags
Post by: Jom on January 31, 2022, 06:54:57 AM
I create a list of the main metadata tags to watch out for in my photos. Now I do everything manually: I look through several standards, select the necessary tags and then look at the "ExifTool Tag Names" page and compose full tag names from the namespace and ExifTool-name to use them in commands.
It is very difficult and easy to make a mistake.

For example, now I do this:
1. look XMP-standard and select necessary tag — xmpDM:comment
2. look "ExifTool Tag Names", select XMP-link and go to page "XMP Tags"
3. find (ctrl+F) on this page "comment" word
4. look notes "(called comment by the spec)" and I see ExifTool-analog — DMComment
5. look namespace for this table in string "These tags belong to the ExifTool XMP-xmpDM family 1 group."
6. compiling the final version of the tag name to use it in ExifTool-commands — XMP-xmpDM:DMComment

Is there an automatic way to find out for standard tags their correspondence in ExifTool?
Title: Re: Mapping standard tags to ExifTool tags
Post by: Phil Harvey on January 31, 2022, 08:27:04 AM
The easiest way is if you have a sample file that contains these tags.  Then just use ExifTool to read the file.

But if you are working from standards documents, unfortunately I think that you are stuck with the process you described.

- Phil
Title: Re: Mapping standard tags to ExifTool tags
Post by: Jom on January 31, 2022, 08:45:08 AM
I don't understand what you mean when you talk about a file with a these tags? Is it a photo or a text file?
Title: Re: Mapping standard tags to ExifTool tags
Post by: Phil Harvey on January 31, 2022, 08:48:17 AM
I mean a photo.

- Phil
Title: Re: Mapping standard tags to ExifTool tags
Post by: Jom on January 31, 2022, 08:54:59 AM
I still don't understand... Should I create this file for myself and use it or do you mean something else?
Title: Re: Mapping standard tags to ExifTool tags
Post by: Phil Harvey on January 31, 2022, 08:57:09 AM
If you can find a sample file containing the metadata you are interested in, or use some other software to produce one for yourself.
Title: Re: Mapping standard tags to ExifTool tags
Post by: Jom on January 31, 2022, 09:03:01 AM
So my way is the only way if I first look for tags in the standards and don't use third party software?
Title: Re: Mapping standard tags to ExifTool tags
Post by: StarGeek on January 31, 2022, 10:38:34 AM
This thread (https://exiftool.org/forum/index.php?topic=9212.0) has a sample file which contains over 1,400 tags already set.  It's what I use to test what data various programs and websites actually read.  There's also an .args file there to create your own.
Title: Re: Mapping standard tags to ExifTool tags
Post by: Jom on January 31, 2022, 11:11:40 AM
Thanks for the link, I'll check it out later.
Now I want to know if my method is correct and the only one, or are there any nuances?
I must clarify this directly in order to close this question for myself and move on.
Title: Re: Mapping standard tags to ExifTool tags
Post by: Phil Harvey on February 02, 2022, 09:14:31 PM
I can't answer this question.  There are many nuances in metadata, and I don't understand the nuances of your workflow.

I may suggest, however, that you are over-thinking this.  You can't possibly tame the wild world of metadata, so you must do whatever works best for you.

- Phil
Title: Re: Mapping standard tags to ExifTool tags
Post by: Jom on February 03, 2022, 01:21:29 AM
My question is simpler than you think.
Here we are not talking about a workflow, but only about a way to find for tags from standards their ExifTool-analogues.
My question is only about this and has no nuances. Everything is exactly as I described early.

Now I do everything manually for each tag separately. Probably, if there was a way to do it more automatically using Exiftool, you would have already told me about it.
I was hoping that Exiftool would be able to give me its tag mappings to standard tags automatically, for example
QuotexmpDM:comment -> XMP-xmpDM:DMComment
but as I already guessed, there is no such possibility.

If such complex documentation and site is generated for Exiftool, then why can't a list of mapping be generated?
Can this feature be added?
Title: Re: Mapping standard tags to ExifTool tags
Post by: Phil Harvey on February 03, 2022, 07:46:46 AM
From your examples it seems that you may only be interested in XMP tags.  This narrows it down quite a bit.

I have prepared a version of the XMP tag name documentation (https://exiftool.org/TagNames/XMP_with_ids.html) which may give you what you want.

- Phil
Title: Re: Mapping standard tags to ExifTool tags
Post by: Jom on February 03, 2022, 10:27:43 AM
Yes, this new table has the right direction, but it's only half a step out of 10 steps.

I'll try to explain the problem a little differently.
My example should not be understood literally, it should be understood in a generalized way.
Not only for XMP
xmpDM:comment -> XMP-xmpDM:DMComment
but for all tags
fullyQualifiedStandardName -> fullyQualifiedExifToolAnalog

I used a specific example only to show the main reason why I cannot just use the names of standard tags for Exiftool - sometimes these names do not match.
There is a second reason - the namespaces also do not match.
All these reasons force me to check manually each tag separately according to the method described earlier.

The essence of my task, which Exiftool cannot solve at the moment, is to automate the creation of a list of matching the full exact names of standard tags with the full exact names of Exiftool analogues.

I create myself a fully controlled process (workflow) for maintain the basic metadata for my photos and use not only the XMP standard, but others:

CIPA DC-010-2020 (Exif 2.32 metadata for XMP)
IPTC Photo Metadata Standard 2021.1 (IPTC Core schema 1.3)
IPTC Photo Metadata Standard 2021.1 (IPTC Extension schema 1.6)
PLUS Version 1.2.3
XMP (XMP SPECIFICATION PART 1. DATA MODEL, SERIALIZATION, AND CORE PROPERTIES. April 2012)
XMP (XMP SPECIFICATION PART 2. ADDITIONAL PROPERTIES. August 2016)


As a result, I have to create commands for Exiftool in order to implement this workflow. And that's exactly why I need to know the full and exact names of Exiftool tags in order to manage the values of standard tags inside photos.

I already made myself a matching list, but it took me a lot of time and effort. Here is the list:


This is fragment of my list
...
XMP      | exif:DateTimeOriginal      | XMP-exif:DateTimeOriginal
XMP      | xmp:CreateDate             | XMP-xmp:CreateDate     
Exif     | DateTimeOriginal           | exif:DateTimeOriginal   
XMP      | photoshop:DateCreated      | XMP-photoshop:DateCreated   
Exif     | OffsetTimeOriginal         | exif:OffsetTimeOriginal     
Exif     | Model                      | exif:Model           
XMP      | tiff:Model                 | XMP-tiff:Model           
XMP      | xmp:CreatorTool            | XMP-xmp:CreatorTool       
XMP      | xmpDM:cameraModel          | XMP-xmpDM:CameraModel     
Exif     | BodySerialNumber         =>| exif:SerialNumber         
XMP      | exifEX:BodySerialNumber  =>| XMP-exifEX:SerialNumber   
XMP      | crs:RawFileName            | XMP-crs:RawFileName       
Exif     | UserComment                | exif:UserComment         
XMP      | exif:UserComment           | XMP-exif:UserComment     
XMP      | xmpDM:comment            =>| XMP-xmpDM:DMComment       
XMP      | Iptc4xmpExt:DigImageGUID =>| XMP-iptcExt:DigitalImageGUID
XMP      | xmpMM:OriginalDocumentID   | XMP-xmpMM:OriginalDocumentID
...

=> — it points to tag names that are different (it's just for myself convenience so I can see it right away).


Why am I writing all this ... Exiftool perfectly extracts and writes metadata, but it can't help at all if I need to create my own commands, starting with the selection of tags from standards.

The way I see the ideal solution to this problem!

1. I manually create a list of required tags in text file, which I simply copy from the standards specifications.

standardTags.txt

exif:DateTimeOriginal
xmp:CreateDate
DateTimeOriginal
photoshop:DateCreated
OffsetTimeOriginal
Model
tiff:Model
xmp:CreatorTool
xmpDM:cameraModel
BodySerialNumber
exifEX:BodySerialNumber
crs:RawFileName
UserComment
exif:UserComment
xmpDM:comment
Iptc4xmpExt:DigImageGUID
xmpMM:OriginalDocumentID


2. Then I enter the command to ExifTool:

exiftool mapping standardTags.txt

3. and get a file with ready-made mapping

standardTags-mapping.txt

exif:DateTimeOriginal      | XMP-exif:DateTimeOriginal   
xmp:CreateDate             | XMP-xmp:CreateDate         
DateTimeOriginal           | exif:DateTimeOriginal       
photoshop:DateCreated      | XMP-photoshop:DateCreated   
OffsetTimeOriginal         | exif:OffsetTimeOriginal     
Model                      | exif:Model                 
tiff:Model                 | XMP-tiff:Model             
xmp:CreatorTool            | XMP-xmp:CreatorTool         
xmpDM:cameraModel          | XMP-xmpDM:CameraModel       
BodySerialNumber         =>| exif:SerialNumber           
exifEX:BodySerialNumber  =>| XMP-exifEX:SerialNumber     
crs:RawFileName            | XMP-crs:RawFileName         
UserComment                | exif:UserComment           
exif:UserComment           | XMP-exif:UserComment       
xmpDM:comment            =>| XMP-xmpDM:DMComment         
Iptc4xmpExt:DigImageGUID =>| XMP-iptcExt:DigitalImageGUID
xmpMM:OriginalDocumentID   | XMP-xmpMM:OriginalDocumentID
Title: Re: Mapping standard tags to ExifTool tags
Post by: Phil Harvey on February 03, 2022, 10:53:46 AM
Unfortunately, ExifTool does not know the "fullyQualifiedStandardName".

StarGeek's sample file gives you what you want for tags which support arbitrary string values.  I think that's about as good as you'll get.

- Phil