ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: linuxuser on February 14, 2012, 06:16:17 PM

Title: Pentax K-5: Error: [minor] Improperly structured XMP (exif:Flash)
Post by: linuxuser on February 14, 2012, 06:16:17 PM
I use the command line below with a Linux OS to write all the metadata, which could have been lost (since a long time without problems)

exiftool -q -q -overwrite_original -tagsfromfile "$EXIFSOURCE" -all:all -tagsfromfile "$TEMPFILE" -all:all "$TEMPFILE"


Now I noticed that my Makernotes are missing and this error was shown with a jpg-file, which imports not existing tags from a Pentax K-5 PEF-file:

QuoteError: [minor] Improperly structured XMP (exif:Flash)

I didn't use a flash with this photo.

This happens with exiftool 8.60 and 8.77

Is there a quick solution for this problem? Maybe something like removing all tags related to flash and importing them again. I assume that bibble doesn't write a correct xmp-tag and exiftool stops writing tags.
Title: Re: Pentax K-5: Error: [minor] Improperly structured XMP (exif:Flash)
Post by: Phil Harvey on February 14, 2012, 06:32:26 PM
The minor error may be ignored with the -m option.

But I would like to see the XMP to verify that this isn't a problem with ExifTool.  Would it be possible to attach the XMP from the source file(s)?  You can extract the XMP with this command:

exiftool -b -xmp FILE > out.xmp

Thanks.

- Phil
Title: Re: Pentax K-5: Error: [minor] Improperly structured XMP (exif:Flash)
Post by: linuxuser on February 15, 2012, 08:40:23 AM
I am very confused in the meantime, because sometimes it works, I mean no error message and Makernotes are copied. I have sent you the "source file" and the "edited file" in 2 mails. I hope you get it, 1 file is over 20 MB.

-m seems to work, I tried about 10 photos.
Title: Re: Pentax K-5: Error: [minor] Improperly structured XMP (exif:Flash)
Post by: Phil Harvey on February 15, 2012, 09:08:21 AM
Thanks for the samples.

I can reproduce the error with this command:

exiftool -tagsfromfile source.pef edited.jpg

The error doesn't occur if I add -all:all to the command because then no XMP is written.

I can confirm that the XMP-exif:Flash is written incorrectly in edited.jpg, so ExifTool rightly complains about this when attempting to write the XMP Flash information.  Using the -m option allows the invalid Flash information to be overwritten.

- Phil

Title: Re: Pentax K-5: Error: [minor] Improperly structured XMP (exif:Flash)
Post by: linuxuser on February 15, 2012, 09:22:31 AM
Thanks for checking it. Is there a way, that exiftools "heals" the metatag-structure? I think on deleting tags and writing it from the source-file? After editing the raw-file the original-tags are valid / important for me, except the new resolution and a few other logical things like jpg instead of pef.
Title: Re: Pentax K-5: Error: [minor] Improperly structured XMP (exif:Flash)
Post by: Phil Harvey on February 15, 2012, 09:03:36 PM
ExifTool may be used to rebuild metadata to remove errors like this.  See FAQ number 20 (https://exiftool.org/faq.html#Q20) for more information, and please let me know if you have any questions.

- Phil
Title: Re: Pentax K-5: Error: [minor] Improperly structured XMP (exif:Flash)
Post by: linuxuser on February 16, 2012, 07:10:51 AM
Thanks, it works then without -m.