ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: fiveyears on May 27, 2019, 03:39:58 AM

Title: Write IPTC to sidecar file
Post by: fiveyears on May 27, 2019, 03:39:58 AM
Hello,

I just want to write my iptc-information to a sidecar file, 'cause heic-files aren't writable I understand. So here is my code:

exiftool -overwrite_original -IPTC:keywords+="Photo" "-IPTC:keywords+=Image"  -IPTC:Country-PrimaryLocationName=Germany  t.xmp
Error: Nothing to write - t.xmp
    0 image files updated
    1 files weren't updated due to errors

Change a jpeg-file works
exiftool -overwrite_original -IPTC:keywords+="Photo" "-IPTC:keywords+=Image"  -IPTC:Country-PrimaryLocationName=Germany  t.jpg works correctly

But write the iptc to a sidecar doesn't work:
exiftool -tagsfromfile t.jpg -iptc:all t.xmp
Error: Nothing to write - t.xmp
    0 image files updated
    1 files weren't updated due to errors

exiftool t.jpg -iptc:all works:

Keywords                        : Photo, Image
Application Record Version      : 4
Country-Primary Location Name   : Germany

What do I do wrong, Why can't I create a correct sidecar by exiftool?

Thanks


fiveyears
Title: Re: Write IPTC to sidecar file
Post by: Phil Harvey on May 27, 2019, 07:28:38 AM
Quote from: fiveyears on May 27, 2019, 03:39:58 AM
'cause heic-files aren't writable I understand.

They are fully writable as of ExifTool 11.43.

QuoteWhat do I do wrong, Why can't I create a correct sidecar by exiftool?

You are trying to write IPTC/IIM tags to an XMP file, which won't work because you can only write XMP tags to an XMP file.

Also, note that HEIC doesn't support IPTC.  You need to use either EXIF or XMP in HEIC files.

- Phil
Title: Re: Write IPTC to sidecar file
Post by: StarGeek on May 27, 2019, 11:25:57 AM
See Metadata Sidecar Files, Example #5 (https://www.exiftool.org/metafiles.html#EX5) for how to copy your IPTC (and EXIF) data to the XMP sidecar.  You'll need to grab the iptc2xmp.args file from SourceForge (https://sourceforge.net/p/exiftool/code/ci/master/tree/arg_files/) or GitHub (https://github.com/exiftool/exiftool/tree/master/arg_files) and drop it in the same directory as exiftool.
Title: Re: Write IPTC to sidecar file
Post by: fiveyears on May 28, 2019, 02:51:40 AM
Thank you, I misunderstood the side car concept. I thought, it is just a copy of all tags of a image.