Issue: tagsfromfile -all:all doesn't copy subsectime tag

Started by Stf_LA, December 18, 2019, 06:48:18 AM

Previous topic - Next topic

Stf_LA

Hi!

I noticed that when you copy the metadata from an images containing a SubSecTimeOriginal tag, to a destination image. The SubSecTimeOriginal tag isn't copied to the destination file.

1) Your system type: Windows 10

2) The ExifTool version: 11.80

3) The specific command line: exiftool.exe -tagsfromfile 1.jpg -all:all 2.jpg or exiftool.exe -tagsfromfile 1.jpg 2.jpg

4) The console output:  1 image files updated


PS > .\exiftool.exe -tagsfromfile 1.jpg 2.jpg
Warning: [minor] Unrecognized MakerNotes - 1.jpg
    1 image files updated
PS > .\exiftool.exe -Alldates 1.jpg
Date/Time Original              : 2019:07:08 14:30:02.592
Create Date                     : 2019:07:08 14:30:03
Modify Date                     : 2019:07:08 14:30:03
PS > .\exiftool.exe -Alldates 2.jpg
Date/Time Original              : 2019:07:08 14:30:02
Create Date                     : 2019:07:08 14:30:03
Modify Date                     : 2019:07:08 14:30:03


Best regards,

Phil Harvey

DateTimeOriginal should not have subseconds, as it appears to have in 1.jpg.

SubSecDateTimeOriginal should store the sub-seconds as you mention.

Try doing this on 1.jpg:

exiftool -a -G1 -s 1.jpg

If DateTimeOriginal contains sub-seconds, they won't be copied.

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

Stf_LA

Hoooo you're right! I'm sorry!
It seems I have something wrong in the python module I use to write the timestamp.

But, there is another strange behavior if the source image contains a subsecond in the datetimeoriginal tag, and a subsectimeoriginal tag

PS > .\exiftool.exe -datetimeoriginal -subsectimeoriginal 1.jpg
Date/Time Original              : 2019:07:08 14:30:02.592
Sub Sec Time Original           : 001
PS > .\exiftool.exe -datetimeoriginal -subsectimeoriginal 2.jpg
PS >

Then, I copy all the tags from 1.jpg to 2.jpg, and the result is weird:

PS > .\exiftool.exe -tagsfromfile 1.jpg 2.jpg
Warning: [minor] Unrecognized MakerNotes - 1.jpg
    1 image files updated
PS > .\exiftool.exe -datetimeoriginal -subsectimeoriginal 2.jpg
Date/Time Original              : 2019:07:08 14:30:02
Sub Sec Time Original           : 592

The correct source SubSecTimeOriginal tag (value=001) is overwritten with the wrong one from DateTimeOriginal (value=592).  ???

Phil Harvey

#3
This is occurring because Exiftool is copying the Composite SubSecDateTimeOriginal tag, which happens to be overriding SubSecTimeOriginal.  A work-around could be to add the -e option to your command to avoid copying Composite tags.

- Phil

Edit: Playing around with your example values, it seems that SubSecDateTimeOriginal takes a funny value:

[Composite]     SubSecDateTimeOriginal          : 2019:07:08 14:30:02.001.592-05:00

Oh well.  I don't know if it is worthwhile patching ExifTool to check the format of DateTimeOriginal before adding the sub seconds in these Composite tags.

Edit2: I've gone ahead and applied the patch anyway, so the next version of ExifTool won't add a 2nd sub-seconds to the Composite sub-second date/time value.

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

Stf_LA

Thank you!

I have fix my script, and will write a small one to correct all my jpg with a wrong subsec in datetimeoriginal.