Author Topic: How to get Focal Length and Lens Info into Metadata import  (Read 18405 times)

Offline mrfearless47

  • Newcomer
  • *
  • Posts: 37
    • View Profile
How to get Focal Length and Lens Info into Metadata import
« on: July 02, 2019, 04:04:51 PM »
Both the focal length and the specific lens is available in the EXIF data with every Nikon NEF photo.  I can't seem to get the lens info, even though I can see the focal length.  With non prime lens that overlap slightly in focal range, this is important to me as I often sort by Lens info to see how a particular lens is performing at certain focal lengths as opposed to another lens covering parts of the same focal range.  I see that a variable called "lens" is available, but I can't seem to find a place to put it into the metadata template.  Suggestions.

I'm using PM 6, Build 3331, as well as PMP Beta Build 3328 under Mac Mojave 10.14.6

Offline Hayo Baan

  • Uber Member
  • ******
  • Posts: 2552
  • Professional Photographer & Software Developer
    • View Profile
    • Hayo Baan - Photography
Re: How to get Focal Length and Lens Info into Metadata import
« Reply #1 on: July 02, 2019, 10:27:41 PM »
What camera and lens doesn't show you the info? Can you share an example?
Hayo Baan - Photography
Web: www.hayobaan.nl

Offline mrfearless47

  • Newcomer
  • *
  • Posts: 37
    • View Profile
Re: How to get Focal Length and Lens Info into Metadata import
« Reply #2 on: July 02, 2019, 10:55:35 PM »
Nikon Z6, 14-30 S lens, Nikon Z6,, 24-70 F4 S, Nikon D850, Nikkor 500 mm f5.6 PFE. That's just a start.  All of this information shows up in exif data in LR Classic, PS CC, Luminqr 3.1, Capture One 12.  They routinely show the focal length used, the aperture, shutter speed,  and the actual lens identification including the serial number.  PM 6 shows all but the specific lens ID, which is extremely important to me in assessing the comparative quality of zoom lens that overlap at portions oftheir zoom ranges.

Offline Odd Skjaeveland

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Re: How to get Focal Length and Lens Info into Metadata import
« Reply #3 on: July 03, 2019, 01:38:53 AM »
I can't seem to get the lens info, even though I can see the focal length.

Added Lens type: {lt} via Edit->Settings->Set Info Text... 

I get
Lens type: AF 135mm f/2D
Lens type: AF 85mm f/2.8D
Lens type: AF Zoom 24-70 f/2.8G
etc
in the Info section top right in the Preview window.

I also set Label 2: {lt} in Edit->Preferences->Contact Sheet.  I can see the lens type string displayed as the second label under each thumbnail in the contact sheet

I often sort by Lens info to see how a particular lens is performing at certain focal lengths as opposed to another lens covering parts of the same focal range.

Opened the Contact Sheet sort criteria drop down list, clicked Edit custom... at the bottom of the list
Edited (sacrificed) Item 1: Sort by type
like so:
Changed Name from Sort by {type} to:  Sort by lenstype {lens}{lt}
Changed Primary from {type} to {lens}
Set Secondary to: {lt}

Selecting 1: Sort by lens type appears to sort contact sheet on focal length {lens} and lens type string {lt}. Switching Primary/Secondary variables appears to have the expected effect.

Does this solve anything for you?

--
Odd S.

Offline mrfearless47

  • Newcomer
  • *
  • Posts: 37
    • View Profile
Re: How to get Focal Length and Lens Info into Metadata import
« Reply #4 on: July 03, 2019, 09:55:56 AM »
Perhaps I am misstating the problem.  The technique you suggest works and the information now appears on the bottom line info for each photo.  However, while that helps, it doesn't propagate to the Info box that you can bring up when viewing a preview of an individual photo.  In the individual photo preview, there is a box that opens under INFO that lists about 20 items for the photo, but lens type is not one of them.  I can't seem to find a way to get that information into that box. 

Is there a place where that information can be edited?  There is a "variables" popup that appears for individual photos, but I can't add lens type (or anything for that matter) to that list.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: How to get Focal Length and Lens Info into Metadata import
« Reply #5 on: July 03, 2019, 10:01:30 AM »
Perhaps I am misstating the problem.  The technique you suggest works and the information now appears on the bottom line info for each photo.  However, while that helps, it doesn't propagate to the Info box that you can bring up when viewing a preview of an individual photo.  In the individual photo preview, there is a box that opens under INFO that lists about 20 items for the photo, but lens type is not one of them.  I can't seem to find a way to get that information into that box. 

Is there a place where that information can be edited?  There is a "variables" popup that appears for individual photos, but I can't add lens type (or anything for that matter) to that list.

Edit->Settings->Set Info Text...

Put the same variables you're now using for the thumbnail labels into the Info Text and you'll be all set.

-Kirk

Offline mrfearless47

  • Newcomer
  • *
  • Posts: 37
    • View Profile
Re: How to get Focal Length and Lens Info into Metadata import
« Reply #6 on: July 03, 2019, 10:22:09 AM »
OK.  Now I'm making progress.  I get the {lt} information to show.  It doesn't show the lens brand (Lens Type Number} as a text string.  Instead it simply shows it as: 0, with no translation to Nikon, Canon, Sigma, Fuji whatever.  Is there a variable that I'm missing that converts the numeric brand to its text equivalent.  Again, this shows up in other programs as a text string, so I assume that it must be available in the image's EXIF.

Thanks.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: How to get Focal Length and Lens Info into Metadata import
« Reply #7 on: July 03, 2019, 11:11:46 AM »
OK.  Now I'm making progress.  I get the {lt} information to show.  It doesn't show the lens brand (Lens Type Number} as a text string.  Instead it simply shows it as: 0, with no translation to Nikon, Canon, Sigma, Fuji whatever.  Is there a variable that I'm missing that converts the numeric brand to its text equivalent.  Again, this shows up in other programs as a text string, so I assume that it must be available in the image's EXIF.

If you'll share a sample image, I'll see what variables I can find that will produce that data. Use the 'Attachments and other options' link when you're composing your reply to this message and there you'll be able to upload your file.

Thanks,

-Kirk

Offline mrfearless47

  • Newcomer
  • *
  • Posts: 37
    • View Profile
Re: How to get Focal Length and Lens Info into Metadata import
« Reply #8 on: July 03, 2019, 01:17:19 PM »
Unfortunately, my images are in lossless compressed RAW format, and will not compress further to the maximum size allowed.  In fact, I've taken samples from two different cameras and two different lenses, and the file sizes are considerably greater than I can attach.  Do you have an alternate location I can send a 29MB file and a 55 MB file.

Offline mrfearless47

  • Newcomer
  • *
  • Posts: 37
    • View Profile
Re: How to get Focal Length and Lens Info into Metadata import
« Reply #9 on: July 03, 2019, 01:33:53 PM »
Using exiftool (for Mac) there are two fields - Lens ID and Lens Info.  The former just gives the lens details without the brand, while Lens Info gives the Brand name, the various abbreviations Nikon uses, and the actual lens information.  For example.  Lens ID shows AF-P 70-300 f4.5-5.6, while Lens Info gives Nikon FX AF-P 70-300 f4.5-5.6.  On a Z camera and Z lens, the Lens Info will state Nikon Z 14-30 f4 S, while the Lens ID will just show 14-30 f4

Offline mrfearless47

  • Newcomer
  • *
  • Posts: 37
    • View Profile
Re: How to get Focal Length and Lens Info into Metadata import
« Reply #10 on: July 03, 2019, 01:39:49 PM »
My bad.  The two fields are Lens ID which provides full info about the precise lens, while Lens Spec provides only the details about lens focal lengths without brand identifier.  It seems that Lens ID within PM 6 is actually reading the Lens Spec field.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: How to get Focal Length and Lens Info into Metadata import
« Reply #11 on: July 03, 2019, 01:41:45 PM »
Unfortunately, my images are in lossless compressed RAW format, and will not compress further to the maximum size allowed.  In fact, I've taken samples from two different cameras and two different lenses, and the file sizes are considerably greater than I can attach.  Do you have an alternate location I can send a 29MB file and a 55 MB file.

You could either use a cloud-based service like Dropbox.com or if you know how to use an FTP client, I can share with you our FTP server info.  Contact me privately either way.

Thanks,

-Kirk

Offline mrfearless47

  • Newcomer
  • *
  • Posts: 37
    • View Profile
Re: How to get Focal Length and Lens Info into Metadata import
« Reply #12 on: July 03, 2019, 01:54:35 PM »
Hope I used the right email address.  Sent you a link to Dropbox.

Offline mrfearless47

  • Newcomer
  • *
  • Posts: 37
    • View Profile
Re: How to get Focal Length and Lens Info into Metadata import
« Reply #13 on: July 09, 2019, 01:42:11 PM »
Any additional info on this matter?

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: How to get Focal Length and Lens Info into Metadata import
« Reply #14 on: July 09, 2019, 04:15:38 PM »
For the "Test500PFE-852718.nef" file, here is what I get from exiftool:
Code: [Select]
Lens                            : 500mm f/5.6
Lens                            : 500mm f/5.6 G VR [6]
Lens Data Version               : 0204
Lens F Stops                    : 5.00
Lens ID                         : Unknown (AD 3C A0 A0 3C 3C D8 4E)
Lens ID Number                  : 173
Lens Type                       : G VR [6]

What specific information are you wanting to see in Photo Mechanic?

-Kirk