Overlapping MakerNotes values

Started by ben80, March 20, 2016, 04:04:38 PM

Previous topic - Next topic

ben80

Hi,

when i try to read metadata of pictures of an old camera i get an error about the maker notes.
     Warning: [minor] Overlapping MakerNotes values - <file>
     Warning: [minor] Possibly incorrect maker notes offsets (fix by 3842?) - <file>



I read the post of FAQ#15 (https://exiftool.org/faq.html#Q15), but that didn't work for me. Maybe i am doing it wrong.
    exiftool -G1 -F -overwrite_original -a <file>

Exiftool does say it changed the offset, but it doesn't actually change the file:
    [minor] Adjusted MakerNotes base by 3842

I also tried to write some random metadata to force exiftool to change the file (-xmp:title=test). Then i deleted that metadata again. The warning still remains.

Could anybody give me some hints?
Thanks a lot.

Ben

Phil Harvey

Hi Ben,

If you email me a sample to test I can give you some informed advice on this.  My mail is philharvey66 at gmail.com

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

Phil Harvey

Hi Ben,

I got the sample.  The problem is due to the makernotes block having been incorrectly moved by Microsoft software without properly updating the embedded offsets.  With the -F option, ExifTool makes an educated guess about what the offset should be, but unfortunately in this case it guesses wrong.  For the file you sent, it adjusts the offset by 3842, but it should be adjusted by 3826 (16 bytes less).  So for this file, the problem may be fixed by writing any EXIF tag using the option -F3826.  But note that you must write an EXIF tag, because ExifTool won't change the EXIF segment if you just change XMP for example.  So here is a command that will fix this particular file:

exiftool -F3826 -exifversion=0220 FILE

or, better yet, use this command to fix it and remove the extra 4 kB of padding and other garbage was added by Microsoft:

exiftool -F3826 -padding= -offsetschema= FILE

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

ben80

Hi Phil,

wonderful service, thanks a lot.
I have two follow up questions.

1) When using your second command, do i not have to write an exif tag?
    exiftool -F3826 -padding= -offsetschema= FILE
    or
    exiftool -F3826 -padding= -offsetschema= -exifversion=0220 FILE


2) I have around 500 images taken by the same camera, and i get the warning for all of them (or at least, all that i tried).
Is there a way to automate the fix or do i have to check the right byte offset for all images manually?
How would i do that.

Thanks again and have a nice week,
Ben

Phil Harvey

Hi Ben,

Quote from: ben80 on March 22, 2016, 03:10:31 AM
1) When using your second command, do i not have to write an exif tag?

Padding and OffsetSchema are EXIF tags, so the command will update the EXIF.

Quote2) I have around 500 images taken by the same camera, and i get the warning for all of them (or at least, all that i tried).
Is there a way to automate the fix or do i have to check the right byte offset for all images manually?

If you are really lucky, the offset is the same for all of them.  Run this command to see what ExifTool's guesses are:

exiftool -a -warning DIR

If all of them say "fix by 3842", then you are in luck, and the command I gave will likely work for all of them.  Otherwise, we have a bit of work to do.

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

ben80

Quoteexiftool -a -warning DIR
This produced the following result:

   1     times: Warning                         : [minor] Possibly incorrect maker notes offsets (fix by 3878?)
   1     times: Warning                         : [minor] Possibly incorrect maker notes offsets (fix by -326?)
   148 times: Warning                         : [minor] Possibly incorrect maker notes offsets (fix by 3880?)
   501 times: Warning                         : [minor] Possibly incorrect maker notes offsets (fix by 3842?)

So, the two single files can be changed manually.

For the others i see two possibilities:
  1) exiftool loops through all files and based on its own guess it runs the "fixing command" with either one of two offsets
  2) I could generate two filelists and then run the "fixing command" once for each file list, using either one of the two offsets

What would you recommend?

Ben

Phil Harvey

Hi Ben,

I would go with option 2.  It is likely that exiftool guesses 16 bytes too high for the other ones too, but you should confirm this.  Use the -v option on a fixed image, and make sure that the FlashExposureComp rational is something divided by 10 (usually "0/10").

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

ben80

ok, i will go for option 2.

I just tried it with the fixed image i sent you.
BUT..

Exiftool can properly read the xmp data, but using the -v option returns: 7)  FlashExposureComp = undef (0/0)
That's the same like when using the -v option for a not fixed image.

Phil Harvey

OK, something went wrong.  I was careful with the instructions I gave you, and I tested them myself, so I am surprised that they didn't work.  Unfortunately now I'm away for a long weekend, so I won't be able to look into this again until I get back next week.

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

ben80

No problem, it's not urgent.
It would be nice if you could look into this one more time next week, though.

Have a nice weekend!

ben80

Hi Phil,

if you find a few minutes of spare time it would be great if you could look into my issue one more time.

I think the metadata is now read correctly, but your way of checking if all went right, doesn't return what expected.

thanks,
Ben

Phil Harvey

Hi Ben,

Sorry for the delay.  I don't see the same problem, and FlashExposureComp is recovered properly when I use the suggested command on the file you sent:

> exiftool a.jpg -v | grep FlashExp
  | | | 7)  FlashExposureComp = undef (0/0)
> exiftool -F3826 -padding= -offsetschema= a.jpg
Warning: [minor] Overlapping MakerNotes values - a.jpg
Warning: [minor] Adjusted MakerNotes base by 3826 - a.jpg
Warning: [minor] Suspicious MakerNotes offset for MinoltaCameraSettings2 - a.jpg
    1 image files updated
> exiftool a.jpg -v | grep FlashExp
  | | | 7)  FlashExposureComp = 0 (0/10)


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