How to make sure digiKam's XMP metadata is compatible with other software?

Started by polarbeer, October 30, 2011, 01:01:55 PM

Previous topic - Next topic

polarbeer

Hi,

I'm a bit lost with all this metadata "mambo jambo" I find. I have a feeling that you should be programmer to really understand metadata related programs and how to use them.  :-[ So it's very hard to get yourself started, when most of the stuff you read goes "over your head".

I have installed open source digiKam (2.2) Digital Asset Management (DAM) software for Windows. I thought I would use it to attach some basic metadata into my photos (jpg+rw2) and videos (mts/m2ts).

However this version of digiKam for Win seems to be still a bit buggy and the fully comprehensive and easy to understand user guide isn't yet available.

But despite these shortcomings I thought I could use it to attach metadata in XMP sidecar files. I can't probably hurt my original files if I mark them as READ ONLY in Windows Explorer and in digiKam choose: Settings menu --> Configure digiKam --> Metadata --> Behavior tab --> Metadata Writing Mode: Write to XMP sidecar only?

So all metadata I enter should go in sidecar files and if digiKam for some mysterious reason wanted to embed metadata in original files, Read Only status of these files would prevent this from happening.

But is there any easy way to know, that the metadata I enter in DigiKam is correctly formatted and readable by other XMP sidecar file aware software on the market? And how about all future versions of digiKam - can it read the metadata entered in older versions...

XMP is said to be standardized method of adding metadata. However it is also extensible meaning that every one can add their own namespace in XMP metadata. (<-- Is this correctly said?) As a non-native english speaker I don't exactly understand what namespace means. (Not mention many other things...  ;)).

So if anyone with better understanding could shed light on these questions a bit, I would be very thankful! =)

-pb


Phil Harvey

It sounds like what you are doing should be safe.  You don't run the risk of damaging your images if you only write XMP sidecar files.

I haven't used DigiKam, but I would expect they would write standard tags if available.  If they do this, then you should be able to read the tags with a wide variety of software, and hopefully far into the future.  But DigiKam does have a namespace of their own that they use for a few tags.

The XMP namespaces are just a way to avoid conflict a name conflict between tags.  For example, DigiKam uses a CaptionsAuthorNames tag.  Maybe sometime in the future Adobe may start writing a tag with this name, but there will be no conflict because the tags will use a different namespace.  With the full namespace included, the tag identification strings would look something like this to any software:

    http://www.digikam.org/ns/1.0/CaptionsAuthorNames
    http://ns.adobe.com/something/1.0/CaptionsAuthorNames


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

polarbeer

Thanks Phil very much for your quick reply and explaining things once again!  ;D

-pb

polarbeer

Okay,

I finally had time to test digiKam 2.2.0 more in Windows 7 (64 bit Home Premium).

1) I selected two image files (jpg and rw2 version of the same image) in digiKam's Album tree.

2) I entered text in digiKam's fields "Title", "Captions" and "Caption Author". (I started and ended sample text with "**" and entered text with CAPS LOCK on to make it easier to find.)

3) I chose 3 STAR rating for these images.

4) I added few keywords (or tags, as they are called in digiKam) into these images.

(See attached picture.)

Here is the XMP file, that digiKam created for the JPG file. (DigiKam creates xmp file for each file type. For example Image001.jpg.xmp and Image001.rw2.xmp.)

<?xml version="1.0" encoding="UTF-8"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
  <rdf:Description rdf:about=""
    xmlns:tiff="http://ns.adobe.com/tiff/1.0/"
    xmlns:xmp="http://ns.adobe.com/xap/1.0/"
    xmlns:digiKam="http://www.digikam.org/ns/1.0/"
    xmlns:MicrosoftPhoto="http://ns.microsoft.com/photo/1.0/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:lr="http://ns.adobe.com/lightroom/1.0/"
    xmlns:exif="http://ns.adobe.com/exif/1.0/"
   tiff:Software="digiKam-2.2.0"
   xmp:CreatorTool="digiKam-2.2.0"
   xmp:Rating="3"
   digiKam:ColorLabel="0"
   MicrosoftPhoto:Rating="50">
   <tiff:ImageDescription>
    <rdf:Alt>
     <rdf:li xml:lang="x-default">**THIS IS TEXT ENTERED IN "CAPTIONS" FIELD**</rdf:li>
    </rdf:Alt>
   </tiff:ImageDescription>
   <digiKam:TagsList>
    <rdf:Seq>
     <rdf:li>**MY TOP LEVEL TAG-01**</rdf:li>
     <rdf:li>**MY TOP LEVEL TAG-01**/**MY SUB LEVEL-01 TAG-01**</rdf:li>
     <rdf:li>**MY TOP LEVEL TAG-02**</rdf:li>
     <rdf:li/>
    </rdf:Seq>
   </digiKam:TagsList>
   <digiKam:CaptionsAuthorNames>
    <rdf:Alt>
     <rdf:li xml:lang="x-default">**THIS IS TEXT ENTERED IN "CAPTION AUTHOR" FIELD**</rdf:li>
    </rdf:Alt>
   </digiKam:CaptionsAuthorNames>
   <digiKam:CaptionsDateTimeStamps>
    <rdf:Alt>
     <rdf:li xml:lang="x-default">2011-11-06T17:26:05</rdf:li>
    </rdf:Alt>
   </digiKam:CaptionsDateTimeStamps>
   <MicrosoftPhoto:LastKeywordXMP>
    <rdf:Seq>
     <rdf:li>**MY TOP LEVEL TAG-01**</rdf:li>
     <rdf:li>**MY TOP LEVEL TAG-01**/**MY SUB LEVEL-01 TAG-01**</rdf:li>
     <rdf:li>**MY TOP LEVEL TAG-02**</rdf:li>
     <rdf:li/>
    </rdf:Seq>
   </MicrosoftPhoto:LastKeywordXMP>
   <dc:subject>
    <rdf:Bag>
     <rdf:li/>
     <rdf:li>**MY TOP LEVEL TAG-01**</rdf:li>
     <rdf:li>**MY SUB LEVEL-01 TAG-01**</rdf:li>
     <rdf:li>**MY TOP LEVEL TAG-02**</rdf:li>
    </rdf:Bag>
   </dc:subject>
   <dc:title>
    <rdf:Alt>
     <rdf:li xml:lang="x-default">**THIS IS TEXT ENTERED IN "TITLE" FIELD**</rdf:li>
    </rdf:Alt>
   </dc:title>
   <dc:description>
    <rdf:Alt>
     <rdf:li xml:lang="x-default">**THIS IS TEXT ENTERED IN "CAPTIONS" FIELD**</rdf:li>
    </rdf:Alt>
   </dc:description>
   <lr:hierarchicalSubject>
    <rdf:Bag>
     <rdf:li>**MY TOP LEVEL TAG-01**</rdf:li>
     <rdf:li>**MY TOP LEVEL TAG-01**|**MY SUB LEVEL-01 TAG-01**</rdf:li>
     <rdf:li>**MY TOP LEVEL TAG-02**</rdf:li>
     <rdf:li/>
    </rdf:Bag>
   </lr:hierarchicalSubject>
   <exif:UserComment>
    <rdf:Alt>
     <rdf:li xml:lang="x-default">**THIS IS TEXT ENTERED IN "CAPTIONS" FIELD**</rdf:li>
    </rdf:Alt>
   </exif:UserComment>
  </rdf:Description>
</rdf:RDF>
</x:xmpmeta>


Question A:
What do you think about data saved in XMP file? Does digiKam use "common" xmp tags that most XMP aware Digital Asset Management (DAM) programs can read or does is write data in only-DigiKam-can-understand -format? I read Phil's answer above, but would like to hear if attached XMP file shows any problems everybody should be aware of.  :-[

Question B:
Should I choose fi-FI instead of x-default if I write Title and Captions in my mother language (Finnish)? Could someone explain what does this option actually do? Finnish contains three letters Ä, Ö and Å not found in English and I want these letters to be shown correctly. So is it vital to always choose FI-fi if I'm writing in Finnish?
(see attached picture)

By the way, if I have understood this correctly, I found in digiKam's configuration dialog a couple of tag names not listed in digiKam schema tags. (See attached picture.)

https://exiftool.org/TagNames/XMP.html#digiKam


-pb

Phil Harvey

It looks like digiKam has added some tags that should also be added to ExifTool.  If you could write all possible metadata with digiKam and upload an XMP sample I will add support for all of the new tags.

The XMP dc tags (Subject, Title, Description) written by DigiKam are standard.  The rest won't be very portable except for specific applications (LightRoom, Microsoft Photo, DigiKam).

The encoding of all languages is the same.  The alternate languages are just used to display information in different languages.  For best compatibility, you should make sure you fill in the default language.  If you aren't writing the information in English too, then I would write Finnish to x-default.

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

polarbeer

Quote from: Phil Harvey on November 07, 2011, 07:29:11 AM
The encoding of all languages is the same.  The alternate languages are just used to display information in different languages.  For best compatibility, you should make sure you fill in the default language.  If you aren't writing the information in English too, then I would write Finnish to x-default.

Okay, thanks for explanation.

I hadn't thought that same tags could be written in several languages (Both language versions being stored side by side inside file). (I thought it had something to do with encoding.)

Quote from: Phil Harvey on November 07, 2011, 07:29:11 AM
It looks like digiKam has added some tags that should also be added to ExifTool.  If you could write all possible metadata with digiKam and upload an XMP sample I will add support for all of the new tags.

The XMP dc tags (Subject, Title, Description) written by DigiKam are standard.  The rest won't be very portable except for specific applications (LightRoom, Microsoft Photo, DigiKam).

I think digiKam can't write many tags into sidecar files. (I'm still a total newbie with digiKam.) You have to choose embedding in photos (or database?) to write most of the tags. I can try to make necessary sample files for you to investigate. Can you send me private message with your email so I can directly send you some test images and sidecars.

-pb

Phil Harvey

My email is philharvey66 at gmail.com.  Thanks for doing this.

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