Metadata cleanup

Started by Carlo Didier, May 10, 2024, 10:00:47 PM

Previous topic - Next topic

Carlo Didier

I found a number of older files which have a huge mess in their metadata. No idea how this could happen, but a number of fields have multiple identical entries instead of just one.
I can't clean it up in iMatch. The fields always revert to the multiple duplicate values after writing back my changes.

Metadata Analyst gives a long list of errors. But how can I correct this? Any ideas? Anyone had the same problem?

Mario

#1
Are these new files or old files? Do you use metadata templates, AutoFill, custom scripts, reverse geocoding or other features.
Since these seem to be all location tags, and all are repeatable (can contain multiple values), that's a starting point.

always use the proper Metadata Panel Layout for working with location data. The layout is called "6. IPTC Location". This layout allows you to delete the duplicated entries easily and write back to flush out the problems.

If you don't see this layout, you skipped a step in the IMatch 2023 migration guide: TODO: New Default Metadata Panel Layouts
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Carlo Didier

Those are all older files. And it's not only GPS data, but mostly things like Copyright, Title, Location, etc.
I think back then I used Gerosetter, but that would only affect the GPS and location fields, none of the others, like copyright, author, author title, descrition, etc. (see attached other example).

Problem is, because of the errors in the metadata, exiftool can't correct this.

Mario

If the data is in the file, it is also in the database.
If this is not really super-important, just use the "Delete Metadata" preset in ExifTool Command Processor. Before, disable all protection options in Edit > Preferences > Metadata 2 temporarily.
Then fix the broken metadata in the database (MD Panel) and write back.
Afterwards, reset the E > P >  Metadata 2 to defaults.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

cg

I too have run into a similar problem, only with new .DNG files generated by a iPhone.

Some of these files have various metadata fields duplicated 2 or 4 times separated by ;'s, depending on the file.

Looking at the metadata browser, I see that many of the MWG Regions field entries are duplicated, including face Region Names, but not the Person in Image tag. XMP Dublin Core entries and XMP IPTC Extension fields are duplicated, but not XMP IPTC Core. Even the XMP exifEX Lens Info is duplicated, but not Lens Make and Model.

I use a metadata template to fill in a few location-related fields, which may need to be updated now that some of these fields are mapped differently in the newest versions of iMatch, but that wouldn't explain the face region and lens info duplication. This only happens with these .DNG files and not with JPGs. I'm not sure how to edit this or prevent this, and the problem is the dashboard countries get thrown off (see attached image).

Happy to send a sample file if that would be a help.

Thanks!


JohnZeman

Quote from: cg on May 12, 2024, 08:55:56 PMI too have run into a similar problem, only with new .DNG files generated by a iPhone.

Some of these files have various metadata fields duplicated 2 or 4 times separated by ;'s, depending on the file.


A little over a year ago I had this same problem after upgrading my cell phone to an iPhone 14 Pro.

Mario's solution was for me to use the ExifTool Command Processor with the Delete XMP Metadata preset before I do anything else with a newly imported raw DNG from my iPhone.  Once I did that my duplicated metadata problem disappeared and I haven't had any metadata problems since.

Mario

I need a sample DNG file, please.
Apple does all kinds of metadata stuff that never shows in "their" applications (like the zero width/height dimensions for face regions some of their phones still write) and which their software silently covers for. But looking at the same files in another application reveals "problems". Not sure that might be the case for your DNG files.
DNG have become some sort of a "wild west" file format, since Adobe and other vendors change (enhance) it whenever they need something for their applications...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Carlo Didier

Quote from: Mario on May 11, 2024, 09:24:02 PMIf the data is in the file, it is also in the database.
If this is not really super-important, just use the "Delete Metadata" preset in ExifTool Command Processor. Before, disable all protection options in Edit > Preferences > Metadata 2 temporarily.
Then fix the broken metadata in the database (MD Panel) and write back.
Afterwards, reset the E > P >  Metadata 2 to defaults.

Tried that. First time I lost all metadata because iMatch automatically updated the file and thereby deleted the metadata in the DB too, before I could do any correction or write-back (even though I turned off advanced file system scanning).

When I first do the changes in the metadata panel and mark as many fields for writeback as possible, then  run exiftool and immediately (!) after that click on the write-back icon, before iMatch re-reads the metadata from the file, then this works. But I still loose some metadata like shutter speed, aperture, iso, ... because those seem to be non-writable?

All in all, a complicated method which has to be done on each file one-by-one, because of the timing.

Maybe I can find a way to export all metadata to a text file which I can then edit via a script, delete the metadata in the image and let exiftool write-back the corrected information from the edited text file? That could be automated to run on as many files as necessary.


PandDLong


In looking at your first screenshot, I see many tags with the values repeated over and over.

Is that the situation that needs repairing as a metadata template should work for that?

Admittedly the other screenshot lists a bunch of errors which I do not understand so if this is the real problem, I am likely of no help.

Michael

Mario

The metadata is a mess. Even duplicate EXIF tags and maker notes.
Best to wipe it completely and start over. Or, re-save in an image editor.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

Can the "metadata mechanic" not help?

I just cleaned all description from ß to ss  :D and it worked for 1500 images like a charm.
But I tried of course first for only 2 images, then 5, then all.

Maybe a bad idea, but an idea.  ;D
Best wishes from Switzerland! :-)
Markus