News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

A few more questions about the "credit" metadata

Started by alanterra, April 06, 2019, 02:09:48 PM

Previous topic - Next topic

alanterra

There was a discussion about the credit metadata field here https://exiftool.org/forum/index.php/topic,9346.msg48323.html#msg48323, which helps me, but I'm still confused.

As far as I can tell there are two versions of the "credit" metadata in a file (at least, when written by Photoshop Lightroom): a "IIM" or IPTC version that is limited to 32 characters, and an "XMP-photoshop" version that is of unlimited length.

The link above tells me that I can use the flags "-a" or "-G -a" to show both versions of "credit."

My question is, how would you just display the XMP value? Or even better, how would you display the XMP value, if it exists, and the IPTC value otherwise? I thought that somehow the flag "-XMP-photoshop:all" would show this field, since the XMP "credit" field is part of the "photoshop" group, but that doesn't seem to work.

Other fields, like "city" also have this issue. Perhaps there is a general solution for this problem?

StarGeek

Quote from: alanterra on April 06, 2019, 02:09:48 PM
My question is, how would you just display the XMP value?

You add the group name to get a tag in a specific group.  You can just use
exiftool -XMP:Credit FILE
or if you need to be very specific
exiftool -XMP-photoshop:Credit FILE

Most of the time, the general group name will work and is easiest, IMO, but there are rare occasions where you would need to be specific.  For example, there are two XMP Artist tags (that I know of), XMP-tiff:Artist and XMP-xmpDM:Artist.  The XMP-tiff group is more common and exiftool gives it priority if you extract XMP:Artist, but if you need the XMP-xmpDM group specifically, you need to add the full group name.

QuoteOr even better, how would you display the XMP value, if it exists, and the IPTC value otherwise?

To do exactly that, you would probably need to create your own user defined tag.  The priority in which exiftool will write and read tags is 1) EXIF, 2) IPTC (aka IPTC-IIM or legacy), and 3) XMP.  So exiftool would normally show the IPTC value first if it exists, then the XMP.

QuoteI thought that somehow the flag "-XMP-photoshop:all" would show this field, since the XMP "credit" field is part of the "photoshop" group, but that doesn't seem to work.

That's because IPTC:Credit has priority.  See FAQ #3, 3rd paragraph.  Also see the -a (duplicates) option.
   
QuoteOther fields, like "city" also have this issue. Perhaps there is a general solution for this problem?

Same reason.  City is a tag for both IPTC and XMP.  IPTC has priority, so that is what will be displayed unless the -a option is added or it is specifically extracted with -XMP:City (or the more lengthy -XMP-photoshop:City).
* 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).

alanterra


Phil Harvey

Quote from: StarGeek on April 06, 2019, 02:35:30 PM
To do exactly that, you would probably need to create your own user defined tag.  The priority in which exiftool will write and read tags is 1) EXIF, 2) IPTC (aka IPTC-IIM or legacy), and 3) XMP.  So exiftool would normally show the IPTC value first if it exists, then the XMP.

Actually, this priority is only for writing.  For reading without the duplicates option -a enabled, generally the last one read takes priority, but there are exceptions.

You may want to look into the MWG tags which are designed to resolve conflicts between EXIF, IPTC and XMP for some of the more common tags.

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

alanterra

So, if I put a long string in City (using Lightroom), the flags "-use MWG -city" or "-MWG:city" show the long (XMP) string, not the IPTC truncation.

But, this doesn't work for Credit. The flags "-use MWG -credit" shows the short version and "-MWG:credit" doesn't output anything.

Note: this is not a request for a feature, just noting the limitations of the MWG flag.

StarGeek

Quote from: alanterra on April 06, 2019, 04:40:23 PM
But, this doesn't work for Credit. The flags "-use MWG -credit" shows the short version and "-MWG:credit" doesn't output anything.

That's because there isn't a MWG Credit tag.  Make sure you look at the page Phil linked to see what MWG tags actually exist.
* 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).

alanterra

That's what I meant to say, StarGeek. Sorry if it was ham-handed.