Finding Files with ExifTool Errors

Started by jch2103, October 21, 2013, 10:51:19 PM

Previous topic - Next topic

jch2103

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.
John

cytochrome

#1
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...

jch2103

I've added a post on the ExifTool Forum about this. I'll update this post based on feedback from that.
John

cytochrome

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

jch2103

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.
John

cytochrome

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

jch2103

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.
John

cytochrome

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

nortan

Maybe IMatch have similar function or a script? Very long fetched again exiftools to get the errors on all database of photos.

Mario

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



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:










[attachment deleted by admin]
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook