In need of help to fix some Errors I got processing all files on my Photo drive.

Started by Kugelblitz, August 24, 2018, 05:47:33 AM

Previous topic - Next topic

Kugelblitz

Hello

thank you for this great tool. It is simply working great.

I use Picasa to tag faces my local images (in good hope that the facetag data is not sent to google). Picasa does a stunning good job at this task. The downside is that it changes the filedate to the current date and does not leave it at the takendate.

Therefore I use exiftool to correct this issue. Also to delete some unnecessary  Tags created by geosetter (geo:lat=|geo:lon=|ffffffffffffffff)

exiftool "-DateTimeOriginal<CreateDate" "-DateTimeOriginal<CreateDate" "-FileCreateDate<CreateDate" "-FileModifyDate<CreateDate" -sep xxx "-subject<${subject@;$_=undef if /^(geo:lat=|geo:lon=|ffffffffffffffff)/}" "-Keywords<${Keywords@;$_=undef if /^(geo:lat=|geo:lon=|ffffffffffffffff)/}" -r -overwrite_original -ext jpg -ext png -ext cr2 -ext dng -ext nef -ext nrw   --ext mov --ext avi --ext m4v --ext mp4  p: 2>error_log_2018-08-14.txt 1>processed_files_list-2018-08-14.txt

The whole Process took 10 Days!

processed_files_list-2018-08-14.txt
6389 directories scanned
183437 image files updated
12736 image files unchanged
  586 files weren't updated due to errors

I could fix the following errors with geosetter.

Error: [minor] Bad format (513) for MakerNotes entry 0
Error: [minor] Bad MakerNotes offset for NEFBitDepth
Error: File format error
Error: Format error
Error: [minor] Bad MakerNotes offset for FlashSerialNumber
Error: Error writing output file
Error: Format error in file

But the following Errors I could not solve and change the Filedate to the takendate.
Could you guys please give me some help how to fix them?


I just add a sample path and Filename at the end. It is not 275 time the same file.

275 x Error: File not found - z:/Fotos/2003/2003-05-18 Köln/DSCN0878.jpg (same for file or path name containing German "umlauts" ä ö ü ß)
Have read and tried - but could not solve it
https://exiftool.org/forum/index.php?topic=5210.0
https://exiftool.org/forum/index.php?topic=5174.0


196 x Error: Error reading image data - p:/Fotos/2015/2015-08-18 Koblenz Sonja/covar/CONVAR12.cr2

103 x Error: Error reading StripOffsets data in IFD1 - p:/Fotos/2012/2012-03-22 Koblenz Fotoshooting/best of/Agnes/IMG_7058.jpg

16 x Error: JPEG EOI marker not found - p:/Fotos/2003/2003-08-11 KISD Party im Schauspielhaus/CIMG0174.jpg

3 x    Error: Error reading OtherImageStart data in InteropIFD - p:/Fotos/2008/2008-10-13 Whitsundays/Wings2/addons/Copy of eco50 - 10.jpg

Thank you very much for your great work and support.

Phil Harvey

Quote from: Kugelblitz on August 24, 2018, 05:47:33 AM
275 x Error: File not found - z:/Fotos/2003/2003-05-18 Köln/DSCN0878.jpg (same for file or path name containing German "umlauts" ä ö ü ß)
Have read and tried - but could not solve it
https://exiftool.org/forum/index.php?topic=5210.0
https://exiftool.org/forum/index.php?topic=5174.0

This is an ongoing problem for Windows users.  I haven't tried this when specifying a drive letter as the directory.  Do you still have problems if you "cd" to the drive and only specify the root directory name?  This should work if a subdirectory name contains special characters as long as they are supported by the system code page.

Quote196 x Error: Error reading image data - p:/Fotos/2015/2015-08-18 Koblenz Sonja/covar/CONVAR12.cr2

Send me one of these and I'll take a look (philharvey66 at gmail.com)

Quote103 x Error: Error reading StripOffsets data in IFD1 - p:/Fotos/2012/2012-03-22 Koblenz Fotoshooting/best of/Agnes/IMG_7058.jpg

This file was written incorrectly.  There should be no strip data in IFD1 of a JPEG.  See FAQ 20 to repair these JPGs.

Quote16 x Error: JPEG EOI marker not found - p:/Fotos/2003/2003-08-11 KISD Party im Schauspielhaus/CIMG0174.jpg

These images are truncated and can't be repaired.

Quote3 x    Error: Error reading OtherImageStart data in InteropIFD - p:/Fotos/2008/2008-10-13 Whitsundays/Wings2/addons/Copy of eco50 - 10.jpg

FAQ 20 should fix this.  There shouldn't be an image in the InteropIFD.

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

Kugelblitz

Hello Phil,
thank you very much for your quick and helpful reply. Have high respect for your work and support!

Quote from: Phil Harvey on August 24, 2018, 06:39:32 AM
Quote196 x Error: Error reading image data - p:/Fotos/2015/2015-08-18 Koblenz Sonja/covar/CONVAR12.cr2
Send me one of these and I'll take a look (philharvey66 at gmail.com)
Thank you - I have uploaded them to my dropbox and will sent you the link to the files.

Quote from: Phil Harvey on August 24, 2018, 06:39:32 AM
Quote103 x Error: Error reading StripOffsets data in IFD1 - p:/Fotos/2012/2012-03-22 Koblenz Fotoshooting/best of/Agnes/IMG_7058.jpg
This file was written incorrectly.  There should be no strip data in IFD1 of a JPEG.  See FAQ 20 to repair these JPGs.

3 x    Error: Error reading OtherImageStart data in InteropIFD - p:/Fotos/2008/2008-10-13 Whitsundays/Wings2/addons/Copy of eco50 - 10.jpg
FAQ 20 should fix this.  There shouldn't be an image in the InteropIFD.[/quote]
That worked in both cases! Thanks for the hint.

Quote from: Phil Harvey on August 24, 2018, 06:39:32 AM
Quote16 x Error: JPEG EOI marker not found - p:/Fotos/2003/2003-08-11 KISD Party im Schauspielhaus/CIMG0174.jpg
These images are truncated and can't be repaired.
Ok thanks. Lucky that are not to many.


Quote from: Phil Harvey on August 24, 2018, 06:39:32 AM
275 x Error: File not found - z:/Fotos/2003/2003-05-18 Köln/DSCN0878.jpg (same for file or path name containing German "umlauts" ä ö ü ß)
Have read and tried - but could not solve it
https://exiftool.org/forum/index.php?topic=5210.0
https://exiftool.org/forum/index.php?topic=5174.0

This is an ongoing problem for Windows users.  I haven't tried this when specifying a drive letter as the directory.  Do you still have problems if you "cd" to the drive and only specify the root directory name?  This should work if a subdirectory name contains special characters as long as they are supported by the system code page.

I can try it in MacOS X too. I have a MacBook and know terminal, what I do not know is how to access a network drive in Terminal or how to write the correct path to the files in the txt file for MacOS.


Cheers
Thank you Phil for your amazing help.

Kugelblitz

Quote from: Kugelblitz on August 24, 2018, 02:48:30 PM
I can try it in MacOS X too. I have a MacBook and know terminal, what I do not know is how to access a network drive in Terminal or how to write the correct path to the files in the txt file for MacOS.

exiftool '-DateTimeOriginal<CreateDate' '-DateTimeOriginal<CreateDate' '-FileCreateDate<CreateDate' '-FileModifyDate<CreateDate' -sep xxx '-subject<${subject@;$_=undef if /^(geo:lat=|geo:lon=|ffffffffffffffff)/}' '-Keywords<${Keywords@;$_=undef if /^(geo:lat=|geo:lon=|ffffffffffffffff)/}' -r -overwrite_original -ext jpg -ext png -ext cr2 -ext dng -ext nef -ext nrw   --ext mov --ext avi --ext m4v --ext mp4 -@ /Volumes/Stuff/Tests/exiftoolmac/notfound.txt 2>/Volumes/Stuff/Tests/exiftoolmac/error_log_2018-08-25-notfound.txt 1>/Volumes/Stuff/Tests/exiftoolmac/processed_files_list-2018-08-25-notfound.txt

looks like that works

Phil Harvey

I got your dropbox files and I don't have any problems writing any of them with ExifTool.  (I tried just setting -datetimeoriginal=now.)  Also, -validate doesn't show any problems with the image data.

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

Kugelblitz

Ok I fixed everything I could... Still got 1333 files with the "wrong" Date (Date showing today)
I checked some of the files and it looks like they all do not have a "taken date".
Some were sent through a messenger like whats-app or facebook messenger, some were computer generated Images (3D Renderings), Some are scanned Photos.

So exiftool (or picasa) filled in the current date when the file was saved.

But I have organised my files in a certain folder structure

Year/YYYY-MM-DD Location - Event

like for example

2018/2018-08-26 Los Angeles - Birthday Party of Chris Pine

how can I extract the Date from the Folder and set a fixed time ... like 12:00:00 for my list of files without a taken date and set that as the taken date ?

so for the example that would be 26.08.2018 12:00:00

Thank you so much for your time reading this and you helpful and great replies.

Phil Harvey

Try this:

exiftool -if 'not $SOMEDATETIMETAG' '-SOMDATETIMETAG<${directory;/(\d{4}-\d{2}-\d{2})/ ? "$1 12:00:00" : undef}' -r -ext ... DIR

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

Kugelblitz

Hello Phil,
thank you for your reply.

I have tried this

exiftool -if 'not $CreateDate' '-CreateDate<${directory;/(\d{4}-\d{2}-\d{2})/ ? "$1 12:00:00" : undef}' '-DateTimeOriginal<CreateDate' '-DateTimeOriginal<CreateDate' '-FileCreateDate<CreateDate' '-FileModifyDate<CreateDate' -r -overwrite_original -ext jpg -ext png -ext cr2 -ext dng -ext nef -ext nrw   --ext mov --ext avi --ext m4v --ext mp4 -@ /Volumes/Stuff/Tests/exiftoolmac/no-taken-date-03.txt 2>/Volumes/Stuff/Tests/exiftoolmac/error_log_2018-08-26-no-taken-date-03.txt 1>/Volumes/Stuff/Tests/exiftoolmac/processed_files_list-2018-08-26-no-taken-date-03.txt


It did something but did not work the way it should.

ExifTool Version Number         : 11.10
File Name                       : 1994-07-12 England Klassenfahrt MVLG (01).jpg
Directory                       : /Volumes/homes/martin/Drive/Moments/Fotos/1994/1994-07-12 England Klassenfahrt MVLG
File Modification Date/Time     : 2018:08:27 16:08:27+02:00
File Access Date/Time           : 2018:08:27 16:08:27+02:00
File Inode Change Date/Time     : 2018:08:27 16:08:27+02:00
Modify Date                     : 2017:12:11 01:47:55
Exif Version                    : 0220
Create Date                     : 1994:19:94 07:12:00

the create Date is set to 1994:19:94 07:12:00 instad of 1994:07:12 12:00:00 (yyyy-mm-dd hh:mm:ss)
the modification and file date is set to the date and time when the program was running.

Phil Harvey

My mistake.  I forgot to return the updated value in the advanced formatting expression:

'-CreateDate<${directory;$_ = /(\d{4}-\d{2}-\d{2})/ ? "$1 12:00:00" : undef}'

But the way you are trying to copy CreateDate to the other tags won't work (because the source tag is always the original value).  You need to do them all using an argument as above.

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