ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: beernoo on November 26, 2020, 08:42:13 AM

Title: Copy All IPTC tags to XMP as if metadata was set with Exiftool in a first place?
Post by: beernoo on November 26, 2020, 08:42:13 AM
Hi,

I realize that the huge advantage of writing metadata with Exiftool is, unless specified otherwise, it will update a data concept (Description, Keywords...) across several industry standard fields (EXIF/IPTC/XMP) so that most software will read the metadata.  :)

But... I have inherited tons of JPG files which were enriched using IPTC strictly e.g. using Irfanview.

What I need to achieve:
Is there a way to bulk update said files so that their IPTC info (ideally any IPTC fields with a value or if it has to be namely: title, caption, keywords, city, country, 3-digit country code, sub location, province/state) get copied to other taxonomies as if the metadata was set with Exiftool in a first place..?
FYI many of these files have xmp region (face tagging) info from Picassa, I need to preserve these.

Nice to have:
Many files have EXIF GPS coordinates and sometimes EXIF description. I realize that XMP has GPS fields as well so I thought it wouldn't hurt (if at all possible) to « port » EXIF values to other classes (XMP) too. That is for extended compatibility reasons but I am pretty sure most software deal with GPS info from EXIF headers anyway hence the « nice to have ».

Thanks!
Title: Re: Copy All IPTC tags to XMP as if metadata was set with Exiftool in a first place?
Post by: beernoo on November 26, 2020, 08:55:45 AM
PS:
I found these posts from 2014 about using the Perl version of Exiftool for something that seems similar. Would that solve the above?
https://exiftool.org/forum/index.php?topic=6077.msg29914#msg29914
https://exiftool.org/forum/index.php?topic=5945.msg29248#msg29248
If that is the answer, is there a way to achieve the same with the executable? I have never used Perl to be honest and wouldn't know where to start!

Any advice is appreciated!
Title: Re: Copy All IPTC tags to XMP as if metadata was set with Exiftool in a first place?
Post by: Phil Harvey on November 26, 2020, 09:34:45 AM
To copy from IPTC to XMP, use the following command with this arg file (https://raw.githubusercontent.com/exiftool/exiftool/master/arg_files/iptc2xmp.args)

exiftool -@ iptc2xmp.args DIR

- Phil
Title: Re: Copy All IPTC tags to XMP as if metadata was set with Exiftool in a first place?
Post by: StarGeek on November 26, 2020, 10:09:37 AM
Quote from: beernoo on November 26, 2020, 08:42:13 AM
FYI many of these files have xmp region (face tagging) info from Picassa, I need to preserve these.

Exiftool won't touch these unless you tell it to.  Phil's command won't touch them.

QuoteMany files have EXIF GPS coordinates and sometimes EXIF description. I realize that XMP has GPS fields as well so I thought it wouldn't hurt (if at all possible) to « port » EXIF values to other classes (XMP) too. That is for extended compatibility reasons but I am pretty sure most software deal with GPS info from EXIF headers anyway hence the « nice to have ».

See all the arg files (https://github.com/exiftool/exiftool/tree/master/arg_files) on GitHub. You can add them to Phil's command in the same way. There is one that will copy GPS to the XMP tags as well as one to copy all the EXIF tags to XMP, including the GPS.  But most programs will pull such data directly from the EXIF block if it exists.  I find that doing this copy adds too much complexity to keep in sync for little gain to justify the extra work.
Title: Re: Copy All IPTC tags to XMP as if metadata was set with Exiftool in a first place?
Post by: beernoo on November 26, 2020, 12:27:22 PM
@Phil: awesome, thanks a lot, discovering args files now, wow powerful!!!

@StarGeek: thanks for sharing best practice here, EXIF will suffice.