Pentax K-5: Error: [minor] Improperly structured XMP (exif:Flash)

Started by linuxuser, February 14, 2012, 06:16:17 PM

Previous topic - Next topic

linuxuser

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.

Phil Harvey

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

linuxuser

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.

Phil Harvey

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

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

linuxuser

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.

Phil Harvey

ExifTool may be used to rebuild metadata to remove errors like this.  See FAQ number 20 for more information, and please let me know if you have any questions.

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