Subject vs Keywords and other apps not seeing data

Started by outdoormagic, June 13, 2020, 04:03:46 PM

Previous topic - Next topic

outdoormagic

Hi All,

This is certainly a "can't see the forest for the trees" question, yet I'm lost.

I have a PERL routine that reads the XMP:Subject and IPTC:Keywords as well as XMP:HierarchicalSubject. It then compares all entries to my controlled vocabulary. If found, all is good and I add the full hierarchy to HierarchicalSubject. If not found, I'm notified. Simple enough.

I ran into an issue where hierarchies appeared that made no sense, such as a horse being labeled marine life.

Dumping the EXIF data, I found the problem:

This, for example, is an XMP file associated with a RW2 raw file:

HierarchicalSubject => 1 - TIME|event|Unique Personal Events|Visit|Visiting the Bison, 2 - LOCATION|country code|USA, 2 - LOCATION|geography|North America|United States|Massachusetts|Merrimac, 2 - LOCATION|geography|North America|United States|Massachusetts|Merrimac|Kimball Farm, 4 - WHAT - OBJECTS - PLANTS - ANIMALS|Living Things|Body and Plant Parts|Mammal Part|head, 4 - WHAT - OBJECTS - PLANTS - ANIMALS|Living Things|Body and Plant Parts|Mammal Part|mouth, 4 - WHAT - OBJECTS - PLANTS - ANIMALS|Living Things|Body and Plant Parts|Mammal Part|nose, 4 - WHAT - OBJECTS - PLANTS - ANIMALS|Living Things|animal|mammal|ungulate|horse|draft horses|Belgian, 5 - HOW - VERBS & ADJECTIVES|cardinal|one|one animal, 5 - HOW - VERBS & ADJECTIVES|characteristic|Color and Tone|black, 5 - HOW - VERBS & ADJECTIVES|characteristic|Color and Tone|dominant color|black, 6 - PHOTOGRAPHY & TECHNICAL|framing|close up|close ups

Keywords => 1 - TIME,2 - LOCATION,4 - WHAT - OBJECTS - PLANTS - ANIMALS,5 - HOW - VERBS & ADJECTIVES,6 - PHOTOGRAPHY & TECHNICAL,Belgian,Body and Plant Parts,Color and Tone,Culture and History,Kimball Farm,Living Things,Mammal Part,Massachusetts,Merrimac,North America,USA,Unique Personal Events,United States,Visit,Visiting the Bison,animal,black,cardinal,characteristic,close up,close ups,country code,dominant color,draft horses,earth sciences,event,framing,geography,head,horse,human part,mammal,marine life part,mouth,nose,one,one animal,science & technology,ungulate

Subject => 1 - TIME, 2 - LOCATION, 4 - WHAT - OBJECTS - PLANTS - ANIMALS, 5 - HOW - VERBS & ADJECTIVES, 6 - PHOTOGRAPHY & TECHNICAL, Belgian, Body and Plant Parts, Color and Tone, Kimball Farm, Living Things, Mammal Part, Massachusetts, Merrimac, North America, USA, Unique Personal Events, United States, Visit, Visiting the Bison, animal, black, cardinal, characteristic, close up, close ups, country code, dominant color, draft horses, event, framing, geography, head, horse, mammal, mouth, nose, one, one animal, ungulate

As you see, Keywords and Subject don't match and for some reason, marine life is indeed in Keywords and if I ran the script, it would add a marine life hierarchy to HierarchicalSubject—which is wrong.

Now, when I view the keywords in Lightroom, for example, (though the same happens with other image browsers), "marine life" never appears. I only see it in exiftool.

I can certainly remove it using exiftool, but that led to larger question: if I can't see/edit Keywords with imaging apps, but I can see the Hierarchical ones and, presumably, the Subject ones, then I must be doing something wrong.

Questions:

  • Is it wrong to use both fields, and if so, which one should I favor?
  • Does the answer to 1) apply to other files embedded data, such as JPEG, DNG?
Thanks,

Paul


StarGeek

Typed a whole thing up and then double checked your post.  And now for a completely different answer.

Quote from: outdoormagic on June 13, 2020, 04:03:46 PM
This, for example, is an XMP file associated with a RW2 raw file:

Here's where the major problem is.  You're looking for Keywords in an XMP file.  If you run
exiftool -G1 -a -s -Keywords /path/to/sidecar.xmp
You'll see that Keywords will be XMP-pdf:Keywords, a tag normally used for PDFs.

IPTC:Keywords can't appear in an XMP sidecar for the simple reason that it is not XMP data.  Only XMP tags will appear in an XMP sidecar file.

But I did notice in testing that Adobe Bridge will ignore IPTC tags in favor of XMP tags.  I set the IPTC:Keywords and XMP:Subject to two different values, and Bridge ignored the IPTC tag, showing only the XMP tag.  I would suspect that the same would happen for LR.

Quoteif I can't see/edit Keywords with imaging apps, but I can see the Hierarchical ones and, presumably, the Subject ones, then I must be doing something wrong.

You're not doing anything wrong, it's just that LR is ignoring IPTC tags if XMP exist.  In the past I'm pretty sure it used to consolidate the two, but that doesn't seem to be the case anymore.

QuoteIs it wrong to use both fields, and if so, which one should I favor?

It's not wrong, but if you aren't using any programs that are limited to IPTC data, then you might as will just use XMP.  It's up to you to decide if it's worth the extra effort to synchronize the two.

As an example, in my case, I use Irfanview on Windows for a lot of quick viewing of files and their metadata.  It can only display IPTC data, not XMP, so I end up synchronize the data.  One of these days, I'm going to get off my butt and try to find another image viewing program that can display XMP data and do the things that Irfanview does.  eh, maybe tomorrow...
* 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).

outdoormagic

Thanks, @Stargeek. That made a lot of sense. I'm usually on MacOS, but I do have a PC with iMatch by Photools. It is a very robust package. I should dust it off, as the past few updates have added remote web interfaces/access and more. As you said, maybe tomorrow :)

Meanwhile, my script might as well specifically read IPTC:Keywords and XMP-dc:Subject—and ignore XMP-pdf:Keywords. I checked other files and the nonsensical keywords always seem to appear in the XMP-pdf - related tags. (And it is certainly not exiftool's doing!)

Thanks again.