photools.com Community

IMatch Discussion Boards => AI, FAQ, Workflow, Tutorials, Tips & Tricks => Metadata => Topic started by: jch2103 on October 21, 2013, 10:51:19 PM

Title: Finding Files with ExifTool Errors
Post by: jch2103 on October 21, 2013, 10:51:19 PM
Some users have reported file ingestion issues with IMatch that appear to caused by ExifTool errors reading their files. This is usually manifested by IMatch/ExifTool repeatedly trying to read files with problem or corrupted metadata. Problems with problem/corrupted metadata aren't too surprising, given the number of different metadata tools many of us have tried/used over the years.

One cure to the problem can be to use ExifTool to rewrite the metadata in these problem files. (See the ExifTool FAQ #20 for more about this: http://www.sno.phy.queensu.ca/~phil/exiftool/faq.html#Q20.) However, if you have a collection of tens or hundreds of thousands of images, it can be difficult to locate the problem files.

ExifTool can be run from a command prompt to find files that generate ExifTool errors. This should be the syntax:
exiftool -all -r [Folder Name] > nul 2> error.txt
     Explanation: -all: reads all metadata tags; -r: recursively processes files in subdirectories; > nul: [one 'l'] discards all regular output (you''ll want all this metadata tag information in IMatch instead!); 2> error.txt: sends all error messages to the text file 'error.txt'.

DISCLAIMERS:
1. This should work, based on postings in the ExifTool Forum (http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,3906.msg18111.html). However, because I've apparently (finally) cleaned up all the metadata in my image collection, I can't directly confirm that this works.   
2. This method requires some familiarity with using programs from the Windows command prompt. Use at your own risk.
Title: Re: Finding Files with ExifTool Errors
Post by: cytochrome on October 22, 2013, 03:58:56 PM
Hello,

It should work, but I cannot confirm it and have some doubts: I search through about 100000 files. I did it by chunks, all NEF, all RW2, all MRW, then all JPG (using -ext NEF etc in the command line) and found no error!!

Seems unlikely, or too good to be true

Francis


PS: Well, it does not work 8) To make sure i used a hex editor to write into the header of a NEF. It is no longer viewable by any viewer or raw converter and Exiftool cannot extract any information from the file. But no error is recoded in error.txt...
Title: Re: Finding Files with ExifTool Errors
Post by: jch2103 on October 22, 2013, 06:27:46 PM
I've added a post on the ExifTool Forum about this. I'll update this post based on feedback from that.
Title: Re: Finding Files with ExifTool Errors
Post by: cytochrome on October 22, 2013, 06:37:18 PM
Weird, I get an output and catching of the 2 files I wrecked with this :

D:\>exiftool -keywords="nonsense" -r ImatchBeta\D80\ > nul 2>erreur.txt

the output is this:

Error: Bad format (65499) for SubIFD entry 0 - ImatchBeta/D80/Anniv_Dede_1/_DSC0521.NEF
Error: Bad IFD or truncated file in IFD0 - ImatchBeta/D80/Anniv_Dede_1/_DSC0522.NEF

So it seems -all won't trigger

Francis
Title: Re: Finding Files with ExifTool Errors
Post by: jch2103 on October 22, 2013, 07:20:00 PM
I got a (really!) quick reply from Phil:
http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,5345.msg25918.html

So it appears my first try wasn't quite right. I'll try some additional checking later today.
Title: Re: Finding Files with ExifTool Errors
Post by: cytochrome on October 22, 2013, 08:04:18 PM
Seems equivalent to my "exiftool -keyword="nonsense"", the output to a scratch folder is of course a good idea, cause now my test nef all have a nonsense keyword.

I saw Phil's answer, "D:\>exiftool -error -warning -r ImatchBeta\D80\ > nul 2>error.txt" does not work here.

Francis
Title: Re: Finding Files with ExifTool Errors
Post by: jch2103 on October 23, 2013, 12:11:34 AM
Phil's reply suggested to me that I wouldn't be able to ID files with errors without writing to them, but that doesn't seem exactly right; probably my misunderstanding. In any event, I tried another variation:
exiftool -error -r [Directory] > nul 2> error.txt
This did find over 400 files with warnings, e.g.:
QuoteWarning: Bad InteropOffset SubDirectory start - Pictures/MinoltaA2/2004_0630/2004_0630_113642AA.JPG
Warning: Bad InteropOffset SubDirectory start - Pictures/MinoltaA2/2004_0630/2004_0630_122717AA.JPG
Warning: Invalid PrintIM header - Pictures/MinoltaA2/2005_1127/PICT1712 geocode.JPG
(Perhaps half of these were minor warnings. Quite a few are cell phone images with unrecognized maker notes, which doesn't surprise me.)

I'll have to try Phil's suggestion to try writing output to a scratch directory, to see what additional errors/warnings get generated from ExifTool rewrites.
Title: Re: Finding Files with ExifTool Errors
Post by: cytochrome on October 23, 2013, 12:44:16 PM
I did try writing -keyword="" which writes nothing but takes ages...

I will test again -error  (my command line was malformed yesterday: -ext NEF when scanning RW2 files...)

Francis
Title: Re: Finding Files with ExifTool Errors
Post by: nortan on April 05, 2014, 08:46:41 PM
Maybe IMatch have similar function or a script? Very long fetched again exiftools to get the errors on all database of photos.
Title: Re: Finding Files with ExifTool Errors
Post by: Mario on April 06, 2014, 11:54:58 AM
You are warming up a very old thread.

What do you want to archive? Find all files for which ExifTool has reported errors?

You can use the Filter Panel for this purpose:

1. Add a Value Filter
2. Select the tag Extra\Error
3. Select the Database Node in the Media & Folders View to bring all files in the database in scope (into the file window).

(https://www.photools.com/community/index.php?action=dlattach;topic=1152.0;attach=4975;image)

Note: To set the Extra\Error tag for the value filter, open the tag selector dialog, switch to the Search all Tags tab and enter extra into the group box to find all Extra tags:

(https://www.photools.com/community/index.php?action=dlattach;topic=1152.0;attach=4973;image)








[attachment deleted by admin]