running an exiftool "repair" changes/drops metadata values

Started by pdriegen, May 24, 2022, 10:33:09 AM

Previous topic - Next topic

pdriegen

Hi,
First, thanks for a great utility!
We use ExifTool as a part of our metadata writing toolchain. If we find we have problems with the existing state of an images metadata, we use exiftool to execute the following command:

exiftool -all= -tagsfromfile @ -all:all -unsafe -icc_profile path/to/file

Our understanding is that the above will attempt to rectify inconsistencies or errors in the images metadata, and on the whole we find this works very well.
However, we've bumped into one scenario where the above command changes the values of existing metadata fields and we can't understand why. Please see the attachments for an example.

before.txt is the output of exiftool path/to/file before running the above repair command.
after.txt is the output after running the above repair command.

Some examples of fields where values have changed:

Sony Image Height
Sony Image Width
Full Image Size
Preview Image Size
Flash Exposure Compensation
Lens Spec
Camera E-mount Version
Lens E-mount Version
Lens Firmware Version

There are more, but just to point out a few.
Can you help me understand why this happened?


StarGeek

The ACDSee region tags are lost because exiftool doesn't know how to write them.  Only the tags listed under XMP-acdsee tags can be copied.  If you need to copy them, then you can either copy as a block with -TagsFromFile @ -XMP (see last few paragraphs of FAQ #9), or you can use the ACDSee config file.

Of the others you mention, they all appear to be Sony Makernotes tags (use FAQ #3 to see duplicates and their locations).  When I run your command, they still appear in the file.  Differences between files.

But the MakerNotes seem to be badly corrupted.  The values in the are wildly inaccurate and checking the warnings gives this
C:\Programs\My_Stuff>exiftool -g1 -a -s -warning -validate "Y:\!temp\ccc\DSC00570.JPG_blurred - Copy.jpg"
---- ExifTool ----
Warning                         : [minor] Overlapping MakerNotes values
Warning                         : [minor] Possibly incorrect maker notes offsets (fix by -126?)
Warning                         : [minor] Bad offset for MakerNotes Tag9401
Validate                        : 3 Warnings (all minor)


Odds are, the file has been edited by a program which doesn't copy the MakerNotes correctly.  And running the FAQ #20 ends up changing them because exiftool tries to fix the MakerNotes, but fails.

You might try FAQ #15, but it may not work.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).