incrementing exif EXIF creation date/time on a group of jpgs

Started by rioguia, January 15, 2018, 01:48:53 PM

Previous topic - Next topic

rioguia

I'm sorry for posting a question that has already been answered (by Phil Harvey) but I've been unable to solve this problem after hours of reading and trial and error.

It's an extension of a question posted here https://photo.stackexchange.com/questions/60342/how-can-i-incrementally-date-photos.

In the post I was trying to follow we follow a two step process:
1.  assign the same createdate to a series of .jpgs; and
2.   increment the create date
exiftool -all= -AllDates="2014:07:26 14:47:05" /home/my_driectory/tmp/ -overwrite_original

this works fine and my pictures all get assigned the same creation date/time.

my goal is to increment the date/time such that the next photos in the sequence would be rendered:
2014:07:26 14:47:06,
2014:07:26 14:47:07,
2014:07:26 14:47:08,
etc.

I have tried various iterations of the following command.  they do change the create time and date but not in the way I expected.

xiftool '-AllDates+<0:00:00$filesequence' /home/my_directory/tmp/ -overwrite_original

any help would be greatly appreciated


Phil Harvey

Quote from: rioguia on January 15, 2018, 01:48:53 PM
I have tried various iterations of the following command.  they do change the create time and date but not in the way I expected.

Not expected how?  Were the EXIF times incremented by a different number of seconds for each file?  If yes, and it is just the number of seconds that is unexpected, then the problem is simply the processing order of the files.  You can use -fileorder filename to force the files to be processed in order of alphabetically-sorted file names.

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

rioguia

thanks for your quick response.  file order did the trick.

the photos are named in number order and I incorrectly assumed that would govern the order.  For my example, they are named:

0001.jpg
0002.jpg,
etc.
exiftool '-AllDates+<0:00:00$FileSequence' /home/my_directory/tmp/ -fileorder -overwrite_original

The only problem is that exiftool ignored my -overwrite_original flag.  I assume I am using the wrong syntax and will go back and try and figure that out.

Thanks so much for your help.



Phil Harvey

You need a tag name for the -fileorder option.  Since you didn't specify one, and -overwrite_original is taken as that tag name (inverse sort order because it starts with a "-").  I'm surprised this worked.  Your command should be:

exiftool '-AllDates+<0:00:00$FileSequence' /home/my_directory/tmp/ -fileorder filename -overwrite_original

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

rioguia

thanks again for your help.  I am posting this final note to summarize what I was trying to do so that someone else might be able to use it.

I was trying to extract a collection .jpgs from an .MOV movie file and then assign them a unique EXIF create date/time.

ffmpeg -i MVI_0553.MOV -r 1 -f image2 %4d.jpg

This gave me a directory with jpgs named 0001.jpg, 00002.jpg, 0003.jpg, etc.

I gave all the .jpgs the same date and time of creation of July 26, 2014 at 2:47 pm:

exiftool -all= -AllDates="2014:07:26 14:47:05" /home/my_driectory/tmp/ -overwrite_original

Then using the suggested comand incremented the creation time like this.

exiftool '-AllDates+<0:00:00$FileSequence' /home/my_directory/tmp/ -fileorder filename -overwrite_original

Many thanks for the moderator's generosity.