Samsung: TimeStamp information is truncated to seconds

Started by IUnknown, June 10, 2022, 07:26:41 AM

Previous topic - Next topic

IUnknown

Hello,

I'm trying to organize all my media files following the naming convention:

%Y%m%d-%H%M%S%3f

exiftool.exe -d "%Y%m%d-%H%M%S%3f%%-c.%%e" "-testname<SubSecDateTimeOriginal" test.heic

It worked just fine for all iPhone media files. But it doesn't work as expected for Samsung S21 files. All Samsung files renamed using the format above have 000 for fractional seconds at the end of their names.

I can see TimeStamp information is present in metadata:

exiftool.exe -v2 test.heic
  SamsungTrailer (SubDirectory) -->
  - Tag 'sefd' (98 bytes)
  + [SamsungTrailer directory]
  | SamsungTrailer_0x0a01Name = Image_UTC_Data
  | - Tag '0x0a01-name' (14 bytes)
  | TimeStamp = 1630590055469
  | - Tag '0x0a01' (13 bytes)
  | SamsungTrailer_0x0aa1Name = MCC_Data
  | - Tag '0x0aa1-name' (8 bytes)
  | MCCData = 255
  | - Tag '0x0aa1' (3 bytes)


TimeStamp = 1630590055469 which is Thursday, 2 September 2021, 13:40:55.469 GMT. But fractional seconds are truncated when I try to extract this information:

exiftool.exe -b -TimeStamp test.heic
2021:09:02 16:40:55+03:00

Is it possible to read Raw information from EXIF?

I also tried this command:

exiftool.exe -b -SamsungTrailer_0x0a01 -u test.heic

But it doesn't return value at all. However the command below returns Image_UTC_Data

exiftool.exe -b -SamsungTrailer_0x0a01Name -u test.heic

Phil Harvey

#1
Reading the raw value is only possible with the -v option.

But I will patch ExifTool 12.46 to return the fractional seconds in the local time zone, eg)

2021:09:02 16:40:55.469+03:00
Thanks for pointing out this loss of precision.

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

IUnknown

Thanks Phil! I upgraded ExifTool to v12.46 and now I can extract TimeStamp information. Btw, is it possible to remove dot produced by %f? In the example below I would like to get file name '20210902-164055469.heic':

exiftool.exe -d "%Y%m%d-%H%M%S%3f%%-c.%%e" "-testname<SubSecDateTimeOriginal" "-testname<TimeStamp" ./test/test.heic

'./test/test.heic' --> './test/20210902-164055.469.heic'
    0 image files updated
    1 image files unchanged

Phil Harvey

Currently you would have to removed the "." using the advanced-formatting option:

exiftool.exe -d "%Y%m%d-%H%M%S%3f%%-c.%%e" "-testname<${SubSecDateTimeOriginal;s/\.//}" "-testname<${TimeStamp;s/\.//}" ./test/test.heic

But in ExifTool 12.49 release I'll add a "-" feature to allow the decimal to be dropped:

exiftool.exe -d "%Y%m%d-%H%M%S%-3f%%-c.%%e" "-testname<SubSecDateTimeOriginal" "-testname<TimeStamp" ./test/test.heic

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

IUnknown

Works like a charm! Thank you for your help Phil, appreciate all the efforts you put in ExifTool.