Lightroom synthesizes metadata -- is this documented anywhere?

  • 1
  • Question
  • Updated 10 months ago
  • (Edited)
[EDITED to correct an error]

When Lightroom imports a file, the metadata in that file are rewritten — into the JPEG itself, or into the sidecar file for raw files (I don't use DNG files—I suspect that they have their own set of rules). I have found a number of inconsistencies in this process, and it is making my life more difficult. Are there known rules for this process of rewriting the metadata?

Here is what I have found:
1) Some fields are copied from a raw file to its sidecar file, presumably for convenience, and some are left only in the raw file. It is not clear to me which fields are copied or why.
2) When these fields are copied from a raw file to its sidecar file, a new value can be synthesized and written into the sidecar file. (Lens is an example).
3) In order to be consistent (I guess) Lightroom shows the same value for Lens, regardless of its value in the image file, so that the value shown in Lightroom is not the value in the file.
4) Certain fields are "synthesized" according to other fields and written into both JPEGs and sidecar files.

Here are examples of these issues. All the following photos were taken on a Canon 5D Mk III with a 65 mm macro lens. The photos were transferred to my computer (a Mac) and imported into Lightroom. Then a field (copyright) was added into each file and the metadata saved. (The file "1K8A7447orig.JPG" is locked, so Lightroom can't write into that file.)
$ exiftool -G -lens -lensid -focusdistanceupper -focusdistancelower -approximatefocusdistance 1K8A7447.JPG 1K8A7447orig.JPG 1K8A7458.CR2 1K8A7458.xmp
======== 1K8A7447.JPG [Composite] Lens : 65.0 mm [Composite] Lens ID : Canon MP-E 65mm f/2.8 1-5x Macro Photo [MakerNotes] Focus Distance Upper : 0.24 m [MakerNotes] Focus Distance Lower : 0.23 m [XMP] Approximate Focus Distance : 0.23 ======== 1K8A7447orig.JPG [Composite] Lens : 65.0 mm [Composite] Lens ID : Canon MP-E 65mm f/2.8 1-5x Macro Photo [MakerNotes] Focus Distance Upper : 0.24 m [MakerNotes] Focus Distance Lower : 0.23 m ======== 1K8A7458.CR2 [Composite] Lens : 65.0 mm [Composite] Lens ID : Canon MP-E 65mm f/2.8 1-5x Macro Photo [MakerNotes] Focus Distance Upper : 0.24 m [MakerNotes] Focus Distance Lower : 0.24 m ======== 1K8A7458.xmp [XMP] Lens : MP-E65mm f/2.8 1-5x Macro Photo [Composite] Lens ID : Canon MP-E 65mm f/2.8 1-5x Macro Photo [XMP] Approximate Focus Distance : 0.24 5 image files read
What we see is
  • "Approximate Focus Distance" is synthesized and written both JPEGs and sidecar files.
  • The value of "Lens" is rewritten as "MP-E65mm f/2.8 1-5x Macro Photo" for xmp files, so it is different between the raw file and its sidecar file.
  • If we look in Lightroom, all these files are shown having a "Lens" of "MP-E65mm f/2.8 1-5x Macro Photo" regardless of the value of "Lens" in the file. So the value shown for JPEG files in Lightroom is not the value actually in the metadata in the JPEG file.
Here is another example. Same camera, different lens.
$ exiftool -G -lens -lensID 1K8A7456.JPG 1K8A7457.CR2 1K8A7457.xmp
======== 1K8A7456.JPG
[Composite]     Lens                            : 100.0 mm
[Composite]     Lens ID                         : Carl Zeiss Makro-Planar T* 100mm f/2 ZE
======== 1K8A7457.CR2
[Composite]     Lens                            : 100.0 mm
[Composite]     Lens ID                         : Carl Zeiss Makro-Planar T* 100mm f/2 ZE
======== 1K8A7457.xmp
[XMP]           Lens                            : Zeiss Makro-Planar T* 2/100 ZE
[Composite]     Lens ID                         : Carl Zeiss Makro-Planar T* 100mm f/2 ZE
    3 image files read
Here we see again that a new value for "Lens" has been synthesized and added to the xmp file, but not to the JPEG file. And in Lightroom both these images show a value of "Zeiss Makro-Planar T* 2/100 ZE", regardless of the value in the files.




And what is interesting is that the string "Zeiss Makro-Planar T* 2/100 ZE" doesn't even occur in the JPEG file:
$ exiftool 1K8A7456.JPG | grep '2/100'
$
If there is any documentation of any of this anywhere, I'd love to know about it.

Thanks
Photo of Alan Harper

Alan Harper

  • 412 Posts
  • 82 Reply Likes
  • confused

Posted 10 months ago

  • 1
Photo of Todd Shaner

Todd Shaner, Champion

  • 989 Posts
  • 324 Reply Likes
Photo of Alan Harper

Alan Harper

  • 412 Posts
  • 82 Reply Likes
Hi Todd.

Thanks, but I don't think that these really address my questions. I probably should have summarized them as this:

1) Lightroom "makes up" data that is not in the photo, and sometimes writes it down in the photo. Is this documented anywhere?

2) Sometimes Lightroom "makes up" data (the same, I think) and displays it in Lightroom, but does not write it down in the photo. Is this documented anywhere?

3) When Lightroom makes an xmp sidecar, some but not all the metadata from the raw file is copied into the xmp. Is this documented anywhere?

4) (In another post). When Lightroom exports a file, some metadata is silently deleted, even though I asked it to retain all metadata. Is this documented anywhere?

Cheers!

Alan
Photo of Todd Shaner

Todd Shaner, Champion

  • 989 Posts
  • 324 Reply Likes
The 'Lens ID' name in the original file and the different 'Lens' XMP name may be due to an internal standard Adobe uses for keeping lens profile names more consistent. It is in fact the 'Lens Profile' name.

A quick Google search on "Approximate Focus Distance" pulls up this link with an inconclusive guesstimate on how it is calculated. And yes it is "made up" using an algorithm inside LR:

 http://www.thelesters.net/2013/approximate-focus-distance-afd-in-xmp-data/

The consensus appears to be that it is unreliable.

https://www.dpreview.com/forums/post/51962463

I do know that the manufacturer's 'Maker Notes' metadata are removed from Export files. Adobe's reason is that it is proprietary and they don't have sufficient information to properly transfer into the Export file's metadata.

John Ellis may be able to provide some additional insight.
Photo of Alan Harper

Alan Harper

  • 412 Posts
  • 82 Reply Likes
Hi Todd

Thanks. That makes it much more clear to me. Adobe needs an reliable name for a lens so it can apply profiles, so it looks at the metadata and creates its own name (sometimes the same as a field within the lens), and then applies that name internally. But it only writes that name into the lens field in the case of sidecar files, and not JPEGs. (As I said, I don't use dng files, I suspect that they have their own set of rules). At least now, I have a rationale to hang onto as I try to figure out these things.

Regarding approximate focus distance, it seems strange that Adobe would add this metadata, but I guess it could be useful. I suspect for my photos it is calculated from the Depth of Field string.

I spent some time investigating whether Depth of Field can be used to recover magnification for some of my photos, and the answer is — sometimes. If anyone is interested I can post the results of that investigation on this forum. (I don't maintain a blog, but I probably should).

Thanks again. This actually clears up a number of questions for a nerd like me.

A
Photo of Todd Shaner

Todd Shaner, Champion

  • 989 Posts
  • 324 Reply Likes
Most lenses only have the single raw lens profile including both lenses in your above examples. JPEGs won't have the 'Lens' XMP entry if there is no JPEG lens profile.

Please feel free to post any information that may be helpful to others landing here, myself included. Thank you.
Photo of John R. Ellis

John R. Ellis, Champion

  • 3587 Posts
  • 927 Reply Likes
"John Ellis may be able to provide some additional insight."

I've never looked closely at lens metadata but have observed before the same confusing symptoms.

Re MakerNotes, see my response to Alan's post, which I changed to be a feature request: https://feedback.photoshop.com/photoshop_family/topics/makernotes-metadata
Photo of Todd Shaner

Todd Shaner, Champion

  • 989 Posts
  • 324 Reply Likes
Thanks John, very helpful!