ExifTool Forum

ExifTool => Archives => Topic started by: Archive on May 12, 2010, 08:54:28 AM

Title: reading from external xmp files from Lightroom or other apps
Post by: Archive on May 12, 2010, 08:54:28 AM
[Originally posted by louiscar on 2008-11-13 13:09:05-08]

What I would find very useful is if Exiftools could read from an external xmp file output by apps such as  Lightroom. Then obviously use that to write to the files in batch mode.

Apps such as Lightroom are great for composing keywords and other metadata but it's incapable of writing to RAW files. Instead it will output to an xmp file which from what I can see is fairly standard.

I've not seen how this can be done but may have missed it. Can anyone tell me if this is possible or if this has been something that has been requested before?
Title: Re: reading from external xmp files from Lightroom or other apps
Post by: Archive on May 12, 2010, 08:54:28 AM
[Originally posted by exiftool on 2008-11-13 16:00:51-08]

ExifTool can do this, but the details depend of the specifics
of what you want to do.  For example, here is a command
to batch write XMP into same-named CR2 files:

Code:
exiftool "-xmp<=%d/%f.xmp" -ext cr2 DIR

(where DIR is the directory containing the CR2 and XMP files)

- Phil
Title: Re: reading from external xmp files from Lightroom or other apps
Post by: Archive on May 12, 2010, 08:54:28 AM
[Originally posted by louiscar on 2008-11-13 18:08:42-08]

Specifically, I'd like to do my keywording and categories in Lightroom for all jpgs and nef files (mainly because that is such a good app for doing exactly that), generate an xmp output and then get those keywords into the xmp / iptc fields.

Thanks for the pointer. Presumably I can isolate the fields I want? It seems that some apps use IPTC:keywords fields and others use the xmp-dc:subject so Ideally I'd like to copy to both although I can see that exiftoolGUI has a copy function from xmp to iptc and visa versa

In my initial tests with exiftool I noticed that copying xmp:all is pretty fatal to my nef files.

eg. I used

exiftool -TagsFromFile  dsc_2774.jpg dsc_2774.nef or
exiftool -tagsFromFile a.jpg -XMP:All a.nef

as a test  (although I've not got to the bottom of why), I want to avoid complete xmp copies for now.

Recently I've been shooting JPG+NEF so I've been doing my keywording on the jpgs and then copying to the nefs, however I may only shoot raw on occasions so the eventual goal is to be able to do all keywording in the least time consuming way and burn to the file to avoid database dependency. Nikon software is totally useless for this job so I've only just begun to try to find a solution.

I shall have a play with Lightroom and it's xmp output, thanks for the tip.
Title: Re: reading from external xmp files from Lightroom or other apps
Post by: Archive on May 12, 2010, 08:54:28 AM
[Originally posted by exiftool on 2008-11-13 19:35:51-08]

Code:
exiftool -TagsFromFile dsc_2774.jpg dsc_2774.nef

I would never suggest copying all tags to a RAW image like this.  It
will likely break the RAW image for most viewers if you write the
MakerNotes, Make, Model, and maybe some other tags.

Code:
exiftool -tagsFromFile a.jpg -XMP:All a.nef

This should be OK.  Please give me more details (camera model,
software used) if you have
problems with images edited using this command.

- Phil
Title: Re: reading from external xmp files from Lightroom or other apps
Post by: Archive on May 12, 2010, 08:54:28 AM
[Originally posted by louiscar on 2008-11-13 20:38:35-08]

Understood Phil.

I am getting there. Have played with your last command and output xmp file from Lightroom and Acdsee.

What I note is that Acdsee  /Viewnx seem to take note of keywords / Categories / Captions from xmp-dc fields whereas Lightroom seems to ignore those fields and take note of the ipct fields instead.

Also Lightroom adds a whold bunch of other xmp-crss fields which I don't need.

Acdsee when writing directly to a jpg file seems to understand the issues by duplicating xmp-dc to iptc fields. This means that most apps will see keywords and categories.

Now I think what I might do (primarily because I can output the fields I require) is use Acdsee to output the xmp file for my Raw file. However, when I import it using your suggested line:

exiftool "-xmp<=%%d/%%f.xmp" -ext nef .

The iptc fields are not written to, so Lightroom won't see the data.

Is there an easy way to duplicate this in the line above or should I run a second batch file to copy fields within? Maybe something like:

exiftool -TagsFromFile @ "-xmp-dc:subject>iptc:keywords" -ext NEF .

exiftool -TagsFromFile @ "-xmp-dc:description>iptc:description" -ext NEF .

etc

I must admit since I started to look into all this I'm finding it a bit of minefield. Each app seems to take different fields also making it hard to transfer fields like ratings / urgency / labels etc. I'm not sure I can deal with ratings as the field itself seems to be non-standard

Ideally I'd like to keep the workflow as simple as possible keywording / ratings or urgency / categories and have them readable by most apps that I use.

To answer your question: I use a Nikon D300, often taking jpg+NEFs although this may vary in favour of JPG or NEF alone. Apps used are Nikon Viewnx / Capture NX2 / Lightroom and Acdsee pro 2.5

The latter is a recent consideration because it has a fairly powerful database, can deal with xmp output,  writes directly to jpgs and deals with offline media which is important to me.

Thanks for the useful utility and your help, I really feel I'm getting somewhere now after many many years of frustration.
Title: Re: reading from external xmp files from Lightroom or other apps
Post by: Archive on May 12, 2010, 08:54:28 AM
[Originally posted by exiftool on 2008-11-14 00:05:26-08]

I just dropped by for a quick check.  Here's something that might help:

You have to be careful to synchronize the IPTC and XMP or LR
will probably read the old IPTC.  There are files in the Image-ExifTool
distribution that will help you with this (iptc2xmp.args and xmp2iptc.args).

- Phil
Title: Re: reading from external xmp files from Lightroom or other apps
Post by: Archive on May 12, 2010, 08:54:28 AM
[Originally posted by louiscar on 2008-11-14 02:41:50-08]

Ah! Ok I'll take a look at that. I was wrong about Lightroom, I got it mixed up with Viewnx. In fact I got a little too confused by the differences that I ended up making some notes. This is what I've found so far.

Lightroom: Reads xmp or iptc data /
   Writes xmp data, (duplicates iptc data for JPG but not for NEFs) adds xmp-crss fields for JPG & (NEF sidecar xmp)

Acdsee: Reads xmp data or iptc data /
   Writes xmp (for sidecar xmp JPG or NEF), duplicates iptc when using batch set mode for JPG

ViewNX: Reads iptc data (ignores xmp) /
   Writes iptc, duplicates to xmp

Capture NX2: Reads iptc data, xmp data (except categories which it reads from iptc) /
   Writes iptc, duplicates to xmp

This is fun ... ok I'm lying.Smiley
,

I'll check out iptc2xmp.args. It would be nice to be able to do this all in one place so that would be a neat solution.

Thanks for your help.