Unable to batch-fix multiple JPEG files

Started by rado, February 16, 2020, 02:39:43 PM

Previous topic - Next topic

rado

Hello, I'm sure I must be doing something wrong but I can't find the right keywords to successfully google a solution... I have a bunch of JPEG files with incorrect timestamps, produced by a "high-quality" trail camera. The makers probably didn't believe it will last into 2020 so the firmware went crazy and the month just overflowed. This is what January timestamps look like:
Date/Time Original: 2019:13:13 21:57:10

Fixing one file is easy:
exiftool "-AllDates+=0" some.jpg

This will result in:
Warning: [minor] Entries in ExifIFD were out of sequence. Fixed. - some.JPG
    1 image files updated


However, attempting to do this on *.jpg or a directory fails - what happens is that the first file is fixed, and the for the rest of files, the issue is only reported. I can't find a way to force it to process all files in one go. Example output:

Warning: [minor] Entries in ExifIFD were out of sequence. Fixed. - PTDC0011.JPG
Warning: Month '12' out of range 0..11 when shifting ModifyDate - PTDC0013.JPG
Warning: Month '12' out of range 0..11 when shifting ModifyDate - PTDC0015.JPG
Warning: Month '12' out of range 0..11 when shifting ModifyDate - PTDC0017.JPG
Warning: Month '12' out of range 0..11 when shifting ModifyDate - PTDC0019.JPG
    1 image files updated
    4 image files unchanged


Can somebody please point me in the right direction? If it matters, I'm using the Windows command-line version of exiftool, tried 11.8.5 and 10.8.4.

StarGeek

You're not doing anything wrong.  This looks like something Phil will have to check into.

In the mean time, is 2019:13 the only year/month you have to deal with or does 2019:14 happen in February?

To fix the first problem, you can use this command
exiftool -TagsFromFile @ -time:all -api "filter=s/2019:13/2020:01/" /path/to/dir

If 2019:14 is a problem, just change 2019:13 to 2019:14 and 2020:01 to 2020:02
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

rado

StarGeek: thank you for the quick response with the workaround, works great! Sadly, yes - February 2020 is the 14th month of 2019 in this camera's universe, but I can live with it now - I download the pictures about once a month, so if I can fix the whole batch with just 2 calls that's still much better than anything else. Thanks again!

Phil Harvey

StarGeek's technique is what I would have suggested.  As you can see the date/time library routines that ExifTool uses don't like months past 12.

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

rado

Thank you both for your feedback! I'm sure this qualifies as a pretty rare edge case. :-)