XMP-dc:Title not showing in MacOS's Preview app

Started by sftoprov, April 09, 2023, 09:04:20 PM

Previous topic - Next topic

sftoprov

I ran this command to copy the contents of the caption field (which for these files is in Caption-Abstract in the [IPTC] group) into the Title field:

exiftool -r -P -m '-Title<Caption-Abstract' -overwrite_original_in_place .

I noticed afterwards that it copied the contents into Title in the [XMP-dc] group. I didn't think anything of that, but when I then look at those .JPG files with the MacOS Preview app, the Inspector doesn't display a title at all. Does the title have to be in a different group (maybe [IPTC] or [XMP]?) rather than [XMP-dc] in order to display as a title in Preview? If so, how do I take care of that? Thanks.

StarGeek

Just because some program, in this case the OS, lists some property of the file the same name as a possible embedded tag, it doesn't mean that they are actually reading the tag of that name.

For example, looking at a jpeg in the Windows Property window, there are 5 different tags that Windows will read for the "Title" property, with only one of them actually being the Title and one that includes the word title in the name, XPTitle. The other three tags is would read are actually description tags.  Under the "Tags" property, it doesn't read any tag with that name. It also uses "Date Taken" to list the time stamp of when the images was taken, but there isn't any tag called "Date Taken".

So this is FAQ #3.  Find a file that already displays the data you want and use the command from FAQ #3 to figure out what the real name of the tag is. 

In this post, there's a zip file called MetadataTestFile.zip, which contains a jpeg with over 1,400 tags already embedded, each with the name of the tag, i.e. XMP-dc:Title has a value of "XMP-dc:Title".  Try looking at that file with finder to see what the actual name of the tag your looking for is.
* 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).

sftoprov

#2
Thanks, Stargeek. Here are the tags I was able to find that refer to caption, title, and keywords in .JPG files on the MacOS file system:

CAPTION
IFD0:ImageDescription
XMP-dc:Description
IPTC:Caption-Abstract           
TITLE
XMP-dc:Title
IPTC:ObjectName
KEYWORDS
XMP-dc:Subject
IPTC:Keywords

I noticed that in the files where Preview was not showing a title in its IPTC tab, exiftool displayed an XMP-dc:Title but not an IPTC:ObjectName. I didn't think that could be the source of the problem, because in a batch of other files I had the same situation but Preview was showing a title. But just to test, I copied the contents of IPTC:Caption-Abstract over to IPTC:ObjectName after having already copied IPTC:Caption-Abstract over to XMP-dc:Title the day before -

exiftool -r -P -m '-Title<Caption-Abstract' -overwrite_original_in_place .
exiftool -r -P -m '-ObjectName<Caption-Abstract' -overwrite_original_in_place .

I don't know why, but that second command seemed to do it. The title was now displaying in Preview's IPTC tab.

So I'm a bit flummoxed. I don't know what combination of title-related tags needs to exist in the image file for Preview to show a title. Sometimes Preview will show a title even there is no IPTC:ObjectName tag (as long as there's an XMP-dc:Title tag), and at other times that IPTC tag must be added for the title to display. I don't imagine that the error message I started getting yesterday--"IPTCDigest is not current. XMP may be out of sync"--has anything to do with it, but I just don't know. I'm sure I'm overlooking and misreading something but as a newcomer to all this I just can't say what it is.

Phil Harvey

I believe that according to the MWG specification, applications are supposed to ignore XMP if the IPTCDigest is not current.

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

StarGeek

Quote from: sftoprov on April 10, 2023, 08:52:45 PMI don't imagine that the error message I started getting yesterday--"IPTCDigest is not current. XMP may be out of sync"--has anything to do with it

As Phil says, when the IPTC data isn't in sync with the XMP data, then the XMP data is supposed to be ignored.  See my answer to your other post about this where there's a link to more details.
* 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).

sftoprov

That sure would make sense as an explanation to what I'm experiencing, given that I started getting that error notification at some point in the middle of my process. I'm trying to learn about all this, but when we say "the IPTC data isn't in synch with the XMP data," what does that mean exactly? Is there an IPTC tag that corresponds with each and every XMP tag--named differently, presumably--and they need to match exactly? I've learned that for title there's IPTC:ObjectName and XMP-dc:Title. Must those both exist and match exactly for any image file we're looking at?

StarGeek

Quote from: sftoprov on April 11, 2023, 09:43:20 PMIs there an IPTC tag that corresponds with each and every XMP tag--named differently, presumably--and they need to match exactly?

Not for every tag, but the most commonly used have corrisponding tags between IPTC IIM and XMP. See the IPTC Photo Metadata Standard.  Each entry gives the tag name for XMP and IPTC IIM.  For example, as you learned, Title would use Title in XMP, under the "XMP Specs" row, and Object-Name in IPTC IIM, under the "IIM Specs" row.  You may have to look on the appropriate Tag Name page to get the exact name.  As shown, the spec gives the name "Object Name" while exiftool uses Object-Name.

QuoteMust those both exist and match exactly for any image file we're looking at?

They must match if you want to write both and use the ITPCDigest.  IMO, it's a lot of extra work to do so, which is why I recommend using one or the other, depending upon what the programs you use will read.

To help synchronize the tags, there are several argument files that will help with copying one group to the other.  See this page on Github.  The files are named for the operation the do.  For example, IPTC2XMP.args will copy all the IPTC IIM into the corresponding XMP tags.  They will also updated the IPTCDigest tag in the process.
* 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).