ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: dhackney on July 16, 2011, 10:23:12 AM

Title: SOLUTION: Synchronize all caption, creator, copyright, etc. fields
Post by: dhackney on July 16, 2011, 10:23:12 AM
Solution name: lr-ccc-equalize

Current Version: V1.00 2011/07/16

Metadata type/form, e.g. photo, video, PDF, etc.: photo

Solution type, e.g. date/time, filename, etc.: caption, creator, copyright, etc.

Platform: Windows

Purpose: To match / sychronize / equalize all photo file caption, creator, copyright, etc. metadata fields

Problem solved: Many photo organizing and editing tools allow the change of one or more metadata fields. Doing so leaves the photo file(s) with some metadata fields that do not match. Different photo geotagging, organizing and editing tools, as well as photo hosting web sites, display different metadata fields for the photos. This can cause many problems related to mismatched captions, labels, titles, etc. on the same photo. By equalizing, or matching, the metadata across all relevent metadata fields, the photos will be treated, processed, displayed, etc. the same by all photo tools and web sites.

Relevant applications: Digital photo or video files whose caption, creator, copyright, etc. was edited by any photo organizing / editing application that allows the edit of a subset of the caption, creator, copyright, etc. metadata fields, e.g. Adobe Lightroom, Adobe Photoshop Elements, etc.

Brief description: Microsoft Windows batch file that calls exiftool and exiftool arguments files. This utility equalizes/matches/synchronizes caption, creator, copyright, etc. metadata across all relevant JPG, CR2 and XMP file metadata fields.

Full description: A utility to match / sychronize / equalize all photo file caption, creator, copyright, etc. metadata fields in all relevant photo files. This utility was created to solve the challenge that Adobe Lightroom does not write the edited metadata to all relevant metadata fields in all relevant files.

lr-datetime-equalize utility batch file documentation:
rem         * This batch file processes all xmp, cr2 and jpg files in a directory and its subdirectories.
rem
rem     * This batch file requires the parameter file lr-ccc-equalize.args for data field mapping.
rem
rem     * Put this batch file and the lr-ccc-equalize.args file in the directory with the files you
rem         wish to process.
rem
rem       * This batch file processes Canon CR2 (RAW) files first, then JPG files.
rem
rem       * If you wish to use this utility for non-Canon RAW files, edit the file name extension CR2 and cr2
rem         below to your applicable RAW filetype extension, e.g., NEF.
rem
rem       * To see more detail about the operations performed, add a -v to the exiftool command lines below.
rem         The level of detail increases with each of the following increments of the variable:
rem         -v, -v0, -v1, -v2, -v3, -v4, -v5
rem
rem     * This batch file requires an installed copy of ExifTool by Phil Harvey.
rem
rem     * Download the ExifTool windows command line version and rename the file exiftool.exe.
rem
rem     * Place the exiftool.exe file in your windows directory or on your system path.
rem
rem  Warning:   
rem  ***************************************************************************************
rem
rem  --> This process overwrites the original files, so make sure you have a backup! <--
rem
rem  ***************************************************************************************


lr-datetime-equalize utility ExifTool arguments file documentation:
#
#               * If you use a different photo organizing / editing application, you may want or need
#                 to choose different source fields. You can change the source fields
#                 in the metadata source to target field mappings below.
#
#
#               * The MetadataDate field is set to the current date and time that the utility executes.
#
#               * RAW files' CR2 and sidecar JPG and XMP files' caption, creator and copyright metadata fields are
#                 populated from the XMP file's metadata fields.
#
#                 RAW files Example:
#                  1. sample.cr2
#                  2. sample.jpg
#                  3. sample.xmp
#                 Each set of RAW files are treated as a unit. All caption, creator and copyright fields in each RAW file
#                 unit are populated with the values in the fields in their .xmp file.
#                 The caption, creator and copyright meta data fields in sample.cr2 and sample.jpg are populated with
#                 the date/time value in the caption, creator and copyright fields in sample.xmp.
#                 
#
#               * JPG files' caption, creator and copyright metadata fields are populated from their relevant
#                 caption, creator and copyright fields.
#
#                 JPG file example:
#                  1. sample-two.jpg
#                 Each JPG file is treated as a single source of caption, creator and copyright information for that file
#                 and that file alone.
#                 In this example, all caption, creator and copyright fields for sample-two.jpg are populated with the 
#                 caption, creator and copyright data from the relevant caption, creator and copyright fields in sample-two.jpg.
#
#
#               * If you wish to drive the source caption, creator and copyright data from diffrent fields other than
#                 the sources used, edit the parameters below.
#               
#               * The batch file that calls this arguments file processes Canon CR2 (RAW) files first, then JPG files.
#
#               * This process populates all caption, creator and copyright fields in all file types: CR2, JPG and XMP
#     
#               * If you wish to use this utility for non-Canon RAW files, edit the batch file to change the filename
#                 extension CR2 and cr2 to your applicable RAW filetype extension, e.g., NEF.
#
#               * To exclude a caption, creator or copyright metadata field from being populated, edit this file and place a # in the first column
#                 of the relevent mapping line. 
#
#
# Warning:
#
#               ****************************************************************************
#
#               >>> This process overwrites your files. Backup your files prior to use.  <<<
#
#               ****************************************************************************


Code / command line: lr-ccc-equalize

The required files, lr-ccc-equalize.bat, lr-ccc-equalize-jpg.args and lr-ccc-equalize-raw.args, are included as a .zip file attached to this post.

Caveats/limitations:


NewbieNotes (specific notes for newbies explaining basic concepts, caveats, etc.):

This utility makes use of a Windows batch file to display information to the user and to control the execution of ExifTool. The batch file contains several useful batch file commands and parameters that you can copy and use in your own batch file, including:

This utility also uses two ExifTool arguments files to provide the mapping of the source and target metadata fields. The arguments files can be used as a template for your own projects.

Note that in the ExifTool command line in the Windows batch file the current working directory is specified with a single period "." character.


Keywords: Adobe, Adobe Lightroom, photo display, sychronize caption, match caption, fix caption, match metadata, sychronize metadata, caption, creator, author, credit, artist, copyright,


Additional information:
Photo Metadata overview: http://www.hackneys.com/travel/docs/metadataoverview.pdf
Excel spreadsheet detailing photo caption, creator, copyright, etc. metadata fields and Adobe Lightroom caption, creator, copyright, etc. metadata fields: http://www.hackneys.com/travel/docs/photo-metadata-ccc.xls

Edit: PH Changed subject
Title: Re: SOLUTION: Synchronize all caption, creator, copyright, etc. fields
Post by: sgbotsford on February 27, 2012, 09:49:30 PM
Perhaps this will start some new discussion about this:

Would the author care to explain how the program resolves conflict?

E.g.  JPegTagger can be set to only write xmp sidecar files.  JT is used to change the exif date created tag.

Now how do you decide whether the exif date in the sidecar file or the exif date in the image is the correct one.

E.g.  An app is used to give a file a creation date that is after it's modification date.

E.g.  A file is scanned on 1 Feb 2012.  Using exiftool the exif create date is set to the time stamp on the slide, 72-Jul without a day or time stamp. 

Title: Re: SOLUTION: Synchronize all caption, creator, copyright, etc. fields
Post by: dhackney on February 27, 2012, 11:18:00 PM
In its current form, the source and targets are all hard-coded into the configuration file.

This utility was built to solve a specific problem caused by Adobe Lightroom, and may not be directly applicable to other scenarios.

If you have specific circumstances in which you know which source is correct, you should modify the configuration file to match your scenario.

If you have development skills, you could add capability, such as live prompts to allow you to make dynamic choices on the best meta data source as the files were processed.