Hello and Happy new year everyone!
While merging my photos collections and making some cleaning, I'm trying to make a batch check for corrupted images. I found here
http://www.commandlinefu.com/commands/view/2352/find-corrupted-jpeg-image-files
the command 'exiftool -warning {}'
My first question: is it a good way to check for corrupted images? or only corrupted metadata ?
Else, my little problem to optimize output
find . -iname "*.jpg" -exec exiftool -warning {} \; >> $log
=> no filename displayed (but exiftool see one file at a time)
got
Warning : Unlisted FPXR segment (index 3)
Warning : Unlisted FPXR segment (index 3)
Warning : Unlisted FPXR segment (index 3)
Warning : Suspicious IFD0 offset for XResolution
Warning : [minor] Possibly incorrect maker notes offsets (fix by 3208?)
Warning : [minor] Possibly incorrect maker notes offsets (fix by -16?)
Warning : [minor] Possibly incorrect maker notes offsets (fix by -16?)
Warning : [minor] Possibly incorrect maker notes offsets (fix by -16?)
Warning : [minor] Possibly incorrect maker notes offsets (fix by 58?)
find . -iname "*.jpg" -print0 | xargs -0 exiftool -warning >> $log
=> all filenames displayed, with or without warnings
any options to get filename only for files where there is a warning?
Thanks a lot
ExifTool does no image validation. It only reports some metadata and structural problems. See FAQ number 25 (https://exiftool.org/faq.html#Q25).
The command to print names of files with warnings could be:
exiftool -p '$directory/$filename' -if '$warning' -r .
or if you only want to check JPG images, this is easier than using 'find':
exiftool -p '$directory/$filename' -if '$warning' -r -ext jpg .
- Phil
Hello Phill
exiftool is great and saved my time and photo collection
Congrats for your great work !
Any clue please about finding photos with errors (warning) AND move them to a separate folder ? (linux)
Thanks a lot for support
The command would be:
exiftool -if '$warning or error' -directory=SOME_OTHER_DIRECTORY -r DIR
- Phil
Thanks a lot.
I am impressed about the quick help you provide. Amazing support.
Regards,
Andrei