Skip to main content
Inspiring
August 25, 2024

P: "Save Metadata to File" overwrites EXIF tag SubSecTimeOriginal

  • August 25, 2024
  • 22 replies
  • 1643 views

Issue: When I save metadata from Lightroom Classic via "Save Metadata to File", I lose subsecond EXIF metadata that was originally there in the file. This is new behavior, did not happen in previous versions (though I'm not sure exactly when it started).

 

Lightroom Classic version: 13.5 [ 202408062022-6258095b ]

System version: macOS 13.6.9

 

To reproduce:

 

1) Import a photo that has a subsecond creation date—for my test, I used an iPhone photo imported via mobile sync.

 

2) Check SubSecTimeOriginal from the command line:

$ -> exiftool -G -s -SubSecTimeOriginal /Volumes/Media/Photos/Import/Mobile\ Import/IMG_6067.HEIC 

[EXIF]          SubSecTimeOriginal              : 389

 

3) In LrC, run the "Save Metdata to File" command

 

4) Check SubSecTimeOriginal from the command line:

$ -> exiftool -G -s -SubSecTimeOriginal /Volumes/Media/Photos/Import/Mobile\ Import/IMG_6067.HEIC 

Warning: [minor] Bad format (16) for MakerNotes entry 14 - /Volumes/Media/Photos/Import/Mobile Import/IMG_6067.HEIC

 

(That warning does not seem directly connected to the issue, but may be a sign of something unexpected happening...)

 

22 replies

Inspiring
September 8, 2024

Now that I know what to look for, I'm noticing it elsewhere: for photos with a blank GPS field, I can set it manually, but sync comes in 50 seconds later and blanks it out again.

Inspiring
September 8, 2024

I've done more testing and found an additional problem.

 

Sure, something happens during sync to mess up the metadata. But that's ok, I can fix it.

 

The problem I'm having is: after I fix up all the metadata, I do "Read Metadata from File", and then in the LrC UI, the "Date Created" field says "2024-02-03T12:13:09.675-08:00". Everything seems to be in sync. But about 50 seconds later, the field reverts to "2024-02-03T12:13:09-08:00"—without any action on my part. Turns out if I pause syncing, though—cloud icon in the top right corner of the LrC window—this doesn't happen.

 

So: not only is mobile sync removing the subsecond metadata, it is actively overwriting my local changes after I try to fix it. Oddly, it will let me make changes to the seconds or time zone—those changes will stick. Just not the subseconds.

johnrellis
Genius
August 28, 2024

"in my testing I can manually add back SubSecTimeOriginal, do "Read Metadata From File", and it doesn't matter—the catalog internal metadata does not get updated"

 

Poking into this further, sync is doing two things to photos it uploads to the LR Cloud:

 

- Removing EXIF:SubSecTimeOriginal

 

- Adding an XMP metadata section containing, among other fields, XMP:DateCreated set to the capture date without fractional seconds.

 

When both EXIF:DateTimeOriginal and XMP:DateCreated are present, the Metadata Working Group standard (which LR follows in general) says the EXIF field should be preferred. But LR is preferring the XMP field, contrary to the standard. So when you do Read Metadata From File, LR reads the capture time from XMP:DateCreated (from which sync removed fractional seconds).

 

Thus step 3 of my workaround should be:

 

exiftool -use mwg "-composite:datetimeoriginal<xmp:createdate" filename

 

This sets the EXIF and XMP fields representing capture date to XMP:CreateDate (date/time of digitization), from which sync hasn't removed fractional seconds. (I've tested this step.)

 

I can't believe my head is filled with this inane legacy industry crap.

Inspiring
August 28, 2024

That's because the sync from LR Mobile to LR Cloud didn't preserve EXIF:SubSecTimeOriginal. Then when LR Classic synced the images to your computer, they were already missing that field, so Read Metadata From File won't do anything.

 

No, in my testing I can manually add back SubSecTimeOriginal, do "Read Metadata From File", and it doesn't matter—the catalog internal metadata does not get updated, and when I later do "Save Metadata to File", it overwrites my change.

johnrellis
Genius
August 27, 2024

"LrC "Read Metadata from File" does not seem to shake files out of this broken state."

 

That's because the sync from LR Mobile to LR Cloud didn't preserve EXIF:SubSecTimeOriginal. Then when LR Classic synced the images to your computer, they were already missing that field, so Read Metadata From File won't do anything.

 

"I'd really love to know what to do to get my existing images out of this broken state!"

 

My testing shows that the sync preserves the EXIF Date Time Digitized and that the Cameras app sets Date Time Original and Date Time Digitized to the same value. (Beware that Exiftool confusingly uses the non-standard name EXIF:CreateDate for the standard name EXIF:DateTimeDigitized.)

 

So you could do this recovery:

 

1. In LR, select all the possibly affected photos.

 

2. Do Metadata > Save Metadata To File.

 

3. At the command line, use Exiftool to copy EXIF:SubSecTimeDigitized to EXIF:SubSecTimeOriginal for all the selected photos.

 

4. In LR, do Metadata > Read Metadata From File.

Inspiring
August 27, 2024

One additional odd thing to observe is that the LrC "Read Metadata from File" does not seem to shake files out of this broken state. Once the catalog has decided they don't have subsecond creation times, there doesn't seem to be anything I can do with the file metadata to correct that. (Eventually, besides addressing the bug for future synced images, I'd really love to know what to do to get my existing images out of this broken state!)

Rikk Flohr_Photography
Community Manager
Community Manager
August 27, 2024

I have rerouted the existing bug to the proper place. Thanks for the head's up!

 

Rikk Flohr: Adobe Photography Org
Rikk Flohr_Photography
Community Manager
Community Manager
August 27, 2024

Moving to Lightroom Eco

 

Moving back to Lightroom Classic

Rikk Flohr: Adobe Photography Org
johnrellis
Genius
August 27, 2024

"Does it not involve Classic?"

 

No. It's the sync upload from LR Mobile and from LR Desktop to LR Cloud that drops the EXIF capture time's fractional seconds. The apps themselves (LR Mobile, LR Desktop, LR Web, LR Classic) and LR Cloud itself all preserve fractional seconds, and the sync upload preserves the digitization time's fractional seconds.

Rikk Flohr_Photography
Community Manager
Community Manager
August 27, 2024

@johnrellis  Does it not involve Classic?

Rikk Flohr: Adobe Photography Org