News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Warning: Sec too small msg when trying to update dates

Started by Simon Truby, April 29, 2012, 07:12:41 PM

Previous topic - Next topic

Simon Truby

Hi

I have a library of photos scanned from hardcopy into TIF files with Vuescan.  I have been trying to update the date fields to make all the time portions unique (I have seen the threads about Filesequence numbers and would attempt this if I could get the basics to work).  However I get the following back:

exiftool -P -overwrite_original -AllDates+="0:0:0 0:05:0" "1956-06-10 142000.tif"
Warning: Sec too small - -4953 < 0 when shifting CreateDate - 1956-06-10 142000.tif
    1 image files updated

However nothing is updated and the problem persists if you try to amend each date field individually.  I'm stumped and have tried this against a JPEG produced from a digital camera and it works fine.... I have tried converting the TIF To a JPEG with Photoshop but the problem persists.  I suspect there is a file compatability issue with the Vuescan generated TIF but cant see what it is.

Hopefully someone can shed some light on this for me.

Simon

Phil Harvey

Hi Simon,

Unfortunately, ExifTool relies on the standard C date/time library functions to do the shifting.  It is on my to-do list to rewrite these in Perl, but until I do this ExifTool is limited to the date range 1970-2034 when shifting date/time values.  Sorry.

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

dmtoddma

QuoteIt is on my to-do list to rewrite these in Perl, but until I do this ExifTool is limited to the date range 1970-2034 when shifting date/time values. 

I was very pleased to find the filesequence tag. Then I was disappointed to find the date limitations, since I am mostly working with scans of old photos. Any chance you could bump this up on the todo list?

David Todd

Phil Harvey

Hi David,

Actually, I was thinking that the 64-bit operating systems may solve this problem for me, so I just tested this here on my Mac (OS X 10.7.4) and in fact the date range restriction is no longer an issue for this C library (and therefore ExifTool as well).  Cool.  Now the question is: what system are you running?

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

dmtoddma


Phil Harvey

There is a 64-bit version of ActivePerl for Windows.  If you install this version and use the Perl version of ExifTool then this problem may be solved for you too.

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

dmtoddma

Quote from: Phil Harvey on August 24, 2012, 07:13:11 AM
There is a 64-bit version of ActivePerl for Windows.  If you install this version and use the Perl version of ExifTool then this problem may be solved for you too.

- Phil

This does work from a command line without the date limitation when using "filesequence". However, I can't get it to work with exiftool gui. I've been trying to work with exiftool_stub, but so far have been unsuccessful. Can you confirm that this can work, and if so, point me to the best available instructions on how to set this up?

David

win 7 /64bit

Phil Harvey

Hi David,

I'm not 100% sure if the stub must be 64 bit or not, but a 64-bit version is available here.

The install instructions would be:

1) Place the exiftool stub (renamed to "exiftool.exe" if necessary) in your Windows directory ("c:\windows").

2) Put the "exiftool" script and "lib" directory from the full ExifTool distribution in c:\perl\site\bin\

This should now work as long as "perl" is in your path somewhere.

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

dmtoddma

Phil,

Most commands are working but date/time statements are not working

In ExiftoolGUI:

-exif:datetimeoriginal="2011:01:01 01:01:01"

or

"-exif:datetimeoriginal=2011:01:01 01:01:01"

produces this error message:

Warning: Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z]) in ExifIFD:DateTimeOriginal (PrintConvInv)
Nothing to do.
Error executing perl
<-END-

The same thing happens from a command line:

c:\Users\David\Pictures\Sandbox\1975-01>exiftool "-exif:datetimeoriginal=2011:01 :01 01:01:01" *
Warning: Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z]) in ExifIFD
:DateTimeOriginal (PrintConvInv)
Nothing to do.
Error executing perl

David

Phil Harvey

Hi David,

There is something funny going on.  What does typing "exiftool -ver" at the command line return?

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

dmtoddma

9.01

Unless there is something you think I should try with my current setup, I think I should try a fresh re-install of exiftool and related components (exiftoolGUI, the stub). I've been evaluating many metadata tools based on exiftool and parts of them are scattered in a variety of places (and with different versions). I need to clean that up, check my path carefully, and make sure I'm running a good installation. It may take me a couple of days to get to this, but I'll post the results as soon as I have done it.

David

Phil Harvey

Hi David,

Sounds good.  As part of the clean-up, delete all ExifTool temporary files so they get regenerated.   The location of the temporary directory depends on the value of the TEMP environment variable (typically "C:\Users\USER\AppData\Local\Temp\par-USER" for Windows 7).

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

dmtoddma

Phil,

I cleared out my various exiftool installations and reinstalled the perl version and the stub. I still have the same problem when I use the stub:

c:\Windows>exiftool -exif:datetimeoriginal="1977:07:07 00:00:01" c:\Users\David\
Pictures\Sandbox\1975-01\
Warning: Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z]) in ExifIFD
:DateTimeOriginal (PrintConvInv)
Nothing to do.
Error executing perl

The installation works correctly when I use the perl script directly:

C:\Perl\site\bin>perl exiftool -exif:datetimeoriginal="1977:07:07 00:00:01" c:\Users\David\Pictures\Sandbox\1975-01\
    1 directories scanned
    2 image files updated

The problem seems to be with the stub. The stub works correctly for everything I've tried except date/time values. Quoted tags using redirection work fine.

I tried both the 64-bit and 32-bit stubs--no difference.

David

dmtoddma

Phil,

Another clue consistent with the hypothesis that the problem is with the stub handling the space character:

C:\Users\David\Pictures\Sandbox\1975-01>exiftool "SF Slides 20081230-11.tif"
File not found: SF
File not found: Slides
File not found: 20081230-11.tif
    0 image files read
    3 files could not be read
Error executing perl

David

Phil Harvey

Hi David,

OK.  It seems like the stub messes with the quoting of arguments.  I'll have to look into this.

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