Embedding metadata in the original image file

Started by Gary, October 30, 2015, 10:25:13 AM

Previous topic - Next topic

Gary

I've been around the block long enough to know that some don't favour embedding metadata in the original image file. Now I am going through the agony of migrating out of Aperture and can foresee that this won't be the last migration. I'm really wary of using just .XMP files for metadata, since they always seem to get separated from the original during the re-organization/transition process and that really makes a mess of things. Believe me I know, since I'm now in the middle of it!

So; I'm seriously considering embedding as much of the data into my  .CR2, and other originals, as possible and keeping the sidecar only for the benefit of any additional info a particular program might want to maintain and a backup of the data in the original. That way, I at least have a fighting chance no matter what flavour of software Apple or Microsoft marketing decisions force me to use.

The various metadata organizations (and there seem to be a few) seem to indicate that getting the metadata into the original, as soon as possible, is the best practice. This is obviously stated solely from a data-rights perspective.

Would there be any real technical risk/reason to avoid the approach I suggest? Note that I tend to use Geosetter for maintaining my metadata and I make sure to update it to use your most recent version of ExifTool.

Phil Harvey

Hi Gary,

To be safe, I always recommend backing up the original files.  That being said, I see no problems embedding XMP in raw images.

If you already have sidecar XMP files, it is relatively easy to do this:

exiftool --ext xmp "-xmp<=%d%f.xmp" DIR

This will stuff the sidecar file as a block into each image file, so the XMP must be properly formatted (inside xpacket+xmpmeta+rdf elements).  Note that it will overwrite any existing XMP in the image.

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

Lenexa64

Phil,

Thanks for your expertise!  I have a weird case where the correct creation date ONLY resides in the XMP sidecar, and I'd like to run a command to update all image files (JPEGs) dates to be the XMP Date Created.  I'm working with some older files that may not have the greatest metadata quality; Within Apple Photos (5.0) the photo date is correct. When exporting 'Unmodified Originals' and selecting 'Export IPTC as XMP' I get two files as expected, but with differing date metadata values as follows (EXIFTOOL outputs):

photo.JPEG
-----------
File Modification Date/Time     : 2009:06:06 13:13:23-05:00
File Access Date/Time             : 2020:01:08 13:16:32-06:00
File Inode Change Date/Time  : 2020:01:08 13:16:31-06:00
Modify Date                           : 0000:00:00 00:00:00          <== Strange that these are empty
Date/Time Original                 : 0000:00:00 00:00:00
Create Date                           : 0000:00:00 00:00:00

photo.XMP
----------
File Modification Date/Time     : 2020:01:08 13:16:21-06:00
File Access Date/Time             : 2020:01:08 13:28:43-06:00
File Inode Change Date/Time     : 2020:01:08 13:16:24-06:00
Date Created                    : 2005:12:03 13:59:06-06:00           <== !! This is the correct date !!

So, as a newbie, is there an EXIFTOOL command to copy the XMP Date Created value to the JPG Date/Time Original for a Directory that includes a batch of JPEG's and their XMP Sidecar files?

Thanks again!

Rob

StarGeek

First, run exiftool -a -s photo.XMP to get tag name you want to copy.  Right now your seeing the tag descriptions (see FAQ #2).

Then see Example 15 on the Metadata Sidecar Files page. 

I believe the tag you want to copy from is the XMP:DateCreated tag but double check to be sure.  Since you want to copy that tag into a different tag, replace the -All:All part of the example with -ModifyDate<DateCreated.

Of course, test it first to make sure it's what you want to do before hitting all your files with the command.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype