ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: txemi on September 05, 2013, 08:37:31 AM

Title: Not able to preserve darktable sidecar information after using exiftool
Post by: txemi on September 05, 2013, 08:37:31 AM
Hi, I introduced exiftool in my workflow and there is something I am not able to do.

After using exiftool to change xmp:rating in Darktable application sidecars sidecars changed so much that lost important information for darktable (history...). I have been playing with exiftool options from manual.

The very first command I used was:
exiftool -Rating=3 DSCF3682.JPG.xmp
But this did not work and I started to play with -all:all , -xmp-xmpMM:all ...
Neither did I find something similar in faq or forums.

The point in all this is that I want to use nice user interface (darktable or any other)  for as much as I can (change rating, labels...)  and use command line (exiftool) for batching and things that cannot be done from UI. I choosed using sidecars not to touch original photos from my camera if possible as well as not bloating version control with changes in big files like photo and video.

Thanks,
txemi.
Title: Re: Not able to preserve darktable sidecar information after using exiftool
Post by: Phil Harvey on September 05, 2013, 09:35:39 AM
Quote from: txemi on September 05, 2013, 08:37:31 AM
After using exiftool to change xmp:rating in Darktable application sidecars sidecars changed so much that lost important information for darktable (history...).

There should be no loss of information when you write an XMP sidecar with ExifTool.  More details are necessary so I can help with this.

QuoteThe very first command I used was:
exiftool -Rating=3 DSCF3682.JPG.xmp
But this did not work

Please explain "did not work".  Did you try to read back the tag with ExifTool?

- Phil
Title: Re: Not able to preserve darktable sidecar information after using exiftool
Post by: txemi on September 05, 2013, 10:49:59 AM
This is de darktable sidecar file BEFORE modification (it was created by sidecar, with little data from image, I do not know if well or bad):

$cat  test.jpg.xmp
<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<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:xmp="http://ns.adobe.com/xap/1.0/"
    xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:darktable="http://darktable.sf.net/"
    xmlns:lr="http://ns.adobe.com/lightroom/1.0/"
   xmp:Rating="3"
   xmpMM:DerivedFrom="DSCF1957.jpg"
   darktable:xmp_version="1"
   darktable:raw_params="0"
   darktable:auto_presets_applied="0">
   <dc:rights>
    <rdf:Alt>
     <rdf:li xml:lang="x-default">    </rdf:li>
    </rdf:Alt>
   </dc:rights>
   <dc:subject>
    <rdf:Seq/>
   </dc:subject>
   <darktable:colorlabels>
    <rdf:Seq/>
   </darktable:colorlabels>
   <darktable:history_modversion>
    <rdf:Seq/>
   </darktable:history_modversion>
   <darktable:history_enabled>
    <rdf:Seq/>
   </darktable:history_enabled>
   <darktable:history_operation>
    <rdf:Seq/>
   </darktable:history_operation>
   <darktable:history_params>
    <rdf:Seq/>
   </darktable:history_params>
   <darktable:blendop_params>
    <rdf:Seq/>
   </darktable:blendop_params>
   <darktable:blendop_version>
    <rdf:Seq/>
   </darktable:blendop_version>
   <darktable:multi_priority>
    <rdf:Seq/>
   </darktable:multi_priority>
   <darktable:multi_name>
    <rdf:Seq/>
   </darktable:multi_name>
   <lr:hierarchicalSubject>
    <rdf:Seq/>
   </lr:hierarchicalSubject>
  </rdf:Description>
</rdf:RDF>
</x:xmpmeta>

This is de COMMAND I exec:
$ exiftool  -Rating=1 test.jpg.xmp
Warning: [minor] Ignored empty rdf:Seq list for dc:subject - test.jpg.xmp
    1 image files updated
$

These are file contents AFTER:
$cat test.jpg.xmp
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='Image::ExifTool 9.04'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>

<rdf:Description rdf:about=''
  xmlns:darktable='http://darktable.sf.net/'>
  <darktable:auto_presets_applied>0</darktable:auto_presets_applied>
  <darktable:raw_params>0</darktable:raw_params>
  <darktable:xmp_version>1</darktable:xmp_version>
</rdf:Description>

<rdf:Description rdf:about=''
  xmlns:dc='http://purl.org/dc/elements/1.1/'>
  <dc:rights>
   <rdf:Alt>
    <rdf:li xml:lang='x-default'>    </rdf:li>
   </rdf:Alt>
  </dc:rights>
</rdf:Description>

<rdf:Description rdf:about=''
  xmlns:xmp='http://ns.adobe.com/xap/1.0/'>
  <xmp:Rating>1</xmp:Rating>
</rdf:Description>

<rdf:Description rdf:about=''
  xmlns:xmpMM='http://ns.adobe.com/xap/1.0/mm/'>
  <xmpMM:DerivedFrom>DSCF1957.jpg</xmpMM:DerivedFrom>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end='w'?>

Having a look at the amount of differences It seems to me that the result was not the expected (lots of darktable things missing). I am using exiftool to read darktable data but I do not dare to use it for writing until having this cleared because I am afraid of breaking something.

Thanks,
txemi
Title: Re: Not able to preserve darktable sidecar information after using exiftool
Post by: Phil Harvey on September 05, 2013, 10:53:03 AM
The warnings explain it all:

> exiftool test.jpg.xmp -rating=1 -a
Warning: [minor] Ignored empty rdf:Seq list for dc:subject - test.jpg.xmp
Warning: [minor] Ignored empty rdf:Seq list for darktable:colorlabels - test.jpg.xmp
Warning: [minor] Ignored empty rdf:Seq list for lr:hierarchicalSubject - test.jpg.xmp
Warning: [minor] Ignored empty rdf:Seq list for darktable:history_modversion - test.jpg.xmp
Warning: [minor] Ignored empty rdf:Seq list for darktable:history_enabled - test.jpg.xmp
Warning: [minor] Ignored empty rdf:Seq list for darktable:history_operation - test.jpg.xmp
Warning: [minor] Ignored empty rdf:Seq list for darktable:history_params - test.jpg.xmp
Warning: [minor] Ignored empty rdf:Seq list for darktable:blendop_params - test.jpg.xmp
Warning: [minor] Ignored empty rdf:Seq list for darktable:blendop_version - test.jpg.xmp
Warning: [minor] Ignored empty rdf:Seq list for darktable:multi_priority - test.jpg.xmp
Warning: [minor] Ignored empty rdf:Seq list for darktable:multi_name - test.jpg.xmp
    1 image files updated


The empty lists were removed, but no actual metadata was lost.

Darktable should not be writing empty lists.  It is a waste of space.

- Phil
Title: Re: Not able to preserve darktable sidecar information after using exiftool
Post by: txemi on September 05, 2013, 01:34:55 PM
Thank you very much, knowing that no data corruption is happening I will use exiftool for writting sidecars then.

Actually I am using sidecars with photos and I use darktable because having tested a lot (geeqie, gthumbs, fspot, shotwell) is the only gui open software that use sidecars I found. For videos (avi and mp4) I am using custom text files per video file storing ratings and keywords and I manually process them with scripts as I did not find any sofware that used sidecars with videos. Would you recommend me use similar sidecars instead my custom files for videos? Would it be some day standard?

I use this workflow for organizing my personal photos and videos and finally I use my own scripts for making photo and video compilations having metadata into account (rating, keywords...) I am starting with this, did you see any flaw in my workflow? Could anything be improved?

Thank you very much for this nice software and thank you for your attention,
txemi.
Title: Re: Not able to preserve darktable sidecar information after using exiftool
Post by: Phil Harvey on September 05, 2013, 01:37:56 PM
Hi Txemi,

Quote from: txemi on September 05, 2013, 01:34:55 PM
Would you recommend me use similar sidecars instead my custom files for videos? Would it be some day standard?
[..]
did you see any flaw in my workflow?

Sorry, I can't provide a knowledgable answer to these questions.

- Phil