Author Topic: Copy XMP data to EXIF?  (Read 4046 times)

mickeh

  • Newbie
  • *
  • Posts: 2
Copy XMP data to EXIF?
« on: February 28, 2012, 07:48:31 AM »
I have recently tagged all my pictures (~5000) with persons in Windows Live Gallery. The tag that holds the name is an XMP tag called RegionPersonDisplay.
Now I use Lightroom 3 and can't search for any names because Lightroom don't search in the RegionPersonDisplay tag.

My hope is now that ExifTool can, by a batch operation, copy all names in RegionPersonDisplay for each photo in every catalogue to EXIF's tag XPKeywords so I can search for persons name in Lightroom. Does anyone know how I do that?

//Micke

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14436
    • ExifTool Home Page
Re: Copy XMP data to EXIF?
« Reply #1 on: February 28, 2012, 01:00:49 PM »
Hi Micke,

This command may do what you want:

exiftool "-xpkeywords<regionpersondisplayname" DIR

In this command, DIR is the name of the directory containing the images.

Add -r to the command to also process sub-directories.

The -sep option may be used to change the separator between keywords.  The default separator is comma+space.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

BogdanH

  • ExifTool Freak
  • *****
  • Posts: 757
  • ExifToolGUI Author
Re: Copy XMP data to EXIF?
« Reply #2 on: February 28, 2012, 02:46:43 PM »
Hi Phil,

I saw Micke's post before and was hoping I could help with answer. However, no matter what I've tried, I couldn't copy value from RegionPersonDisplayName to any other tag. Btw. value is one single word, created with ExifTool:
exiftool -RegionPersonDisplayName=MyName MyFile.jpg
The result from ExifTool was always "Warning: No writable tags set from MyFile.jpg".. "0 image files updated" -so I waited for you.

Now, example you gave above doesn't work here either: I get the same result from ExifTool. What am I doing wrong?

Bogdan

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14436
    • ExifTool Home Page
Re: Copy XMP data to EXIF?
« Reply #3 on: February 28, 2012, 10:45:50 PM »
Oh, sorry.  I forgot this was a flattened tag.  You must add the --struct option to make this work.

See the Copying structures documentation.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

mickeh

  • Newbie
  • *
  • Posts: 2
Re: Copy XMP data to EXIF?
« Reply #4 on: February 29, 2012, 05:44:06 AM »
Really great! So in my test catalogue I did following: exiftool -sep ; --struct -overwrite_original -r "-xpkeywords<regionpersondisplayname" "C:\Users\mikaeha\Downloads\Exif test"
This worked out fine, thank you very much for your help! 8)

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14436
    • ExifTool Home Page
Re: Copy XMP data to EXIF?
« Reply #5 on: March 13, 2012, 08:23:57 AM »
Update:  As of ExifTool 8.83, you no longer need to use the --struct option to copy flattened tags by name.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).