Modify Lens Tag - Max and Min aperture and focal length range?

Started by acnomad, September 12, 2020, 11:09:55 PM

Previous topic - Next topic

acnomad

When I use:
exiftool -lensmake=Canon -lens="EF 50mm f/1.2L USM" -lensmodel="EF 50mm f/1.2L USM" -lensserialnumber=6687214 -overwrite_original "[filename]"
When I use:
exiftool -fnumber -exposuretime -iso -focallength -lens -lensmake -lensmodel -lensserialnumber -focallengthin35mmformat "[filename]"

The result for both files is:

F Number                        : 4.0
Exposure Time                   : 1/2000
ISO                             : 100
Focal Length                    : 50.0 mm
Lens                            : [color=red][b]50mm f/1.2[/b][/color]
Lens Make                       : Canon
Lens Model                      : EF 50mm f/1.2L USM
Lens Serial Number              : 6687214
Focal Length In 35mm Format     : 50 mm


Since the value for "LensModel" had previously been blank it was modified to "EF 50mm f/1.2L USM" as specified in the command line, this is consistent with what would appear for this tag when a native lens is mounted. But "Lens" did not change. I presume Exiftool cannot change that tag for some reason. Is this infomation populated by parameters such as focallength and maxaperturevalue? And for a zoom, would this be based on up to four different numbers (i.e. max and min focal length and max and min aperture for those focal lengths)?


StarGeek

Try the command again, but use the options given in FAQ #3 as the base.  Some of those tags can be duplicates and come from different groups. Without all the information, it's hard to say what is happening.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

acnomad

OK that really helps. Follow up questions:

1. Much of the data is repeated, with slight variations (i.e., 1.3 vs. 1.2 for aperture and 50.4 vs. 50.0 mm focal length)
2. I can see that composite tags are pulling info from other tags. What is the relationship between Nikon tags and EXIF data?


[ExifIFD]       FocalLength                     : 50.0 mm
[ExifIFD]       LensInfo                        : 50mm f/1.2
[Nikon]         LensType                        : G
[Nikon]         Lens                            : 50mm f/1.2
[Nikon]         LensFStops                      : 7.33
[Nikon]         AFAperture                      : 1.5
[Nikon]         FocalLength                     : 50.4 mm
[Nikon]         LensIDNumber                    : 25
[Nikon]         LensFStops                      : 7.33
[Nikon]         MinFocalLength                  : 50.4 mm
[Nikon]         MaxFocalLength                  : 50.4 mm
[Nikon]         MaxApertureAtMinFocal           : 1.3
[Nikon]         MaxApertureAtMaxFocal           : 1.3
[Nikon]         EffectiveMaxAperture            : 1.3
[Composite]     LensID                          : Unknown (19 58 50 50 08 08 A2 06)
[Composite]     LensSpec                        : 50mm f/1.2 G



Phil Harvey

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

acnomad


exiftool -makernotenikon -b [filename]


yields mostly encrypted information. Wrong command?

Phil Harvey

What are you trying to do?  To see all of the detail, use either -v3 or -htmldump

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

acnomad

Ultimately, I'm trying to manually enter a command that achieves the same thing that the Lenstagger (Lightroom plugin) used to do for me before it stopped working on Macs. In the process of seeking a replacement for that GUI, I found others that are less capable. They do not allow modification of as many EXIF tags as Lenstagger did. In fact, as I learn more about your excellent tool, I am discovering that even when Lenstagger was operational, it had shortcomings.

In the end, I am hoping to create a command line string as a template that is comprehensive enough to ensure that all the EXIF data associated with the lens make and model, focal length(s), max aperture, actual aperture, lens serial number, focus mode, etc. can be written to the file. In short, enough information to look back at the file and be able to repeat the controllable conditions that were used at the time of image capture.

I'm trying to learn enough to achieve that without diving into every rabbit hole, but I do see that I need to understand better the relationship between maker notes, "commonly used" EXIF data, and any derivatives of that information, such as composite data.

As I wade through the different tags, I have noticed that EXIF data written by Nikon cameras varies not only depending on which body, but also depending on whether a native, adapted F-mount, other adapted chipped lenses, and adapted legacy (non-chipped) lenses. A couple things that I'm trying to figure out in specific:

1. When there is no data transmitted from lens to body, which tags do the so-called non-CPU values (entered by the user via camera menu) write to?
2. Why does focal length and maxaperturevalue populate (or at least it seems to populate) into the Lens or LensModel tag. This is important because ti causes different information to appear for Lens model in Lightroom compared to the same field in Photo Mechanic, and I am trying to have consistency between those two applications.
3. Why does lensserialnumber sometimes populate, but other times doesn't - even with Nikon lenses? (e.g., a given lens's serial number will appear in EXIF data for NEF files out of one camera but not another.)


Phil Harvey

None of your questions concern ExifTool, but I will try to answer them anyway.

Quote from: acnomad on September 13, 2020, 11:35:37 AM
1. When there is no data transmitted from lens to body, which tags do the so-called non-CPU values (entered by the user via camera menu) write to?

I can't answer this.  You would have to try that yourself.

Quote2. Why does focal length and maxaperturevalue populate (or at least it seems to populate) into the Lens or LensModel tag.

Populated by the camera for non-CPU lenses you mean?  This makes sense because the camera needs to write something, and if it knows the min/max focal length and min/max aperture, it could presumably write a generic lens model of the form "200-500mm F4.5-5.6".

Quote3. Why does lensserialnumber sometimes populate, but other times doesn't - even with Nikon lenses? (e.g., a given lens's serial number will appear in EXIF data for NEF files out of one camera but not another.)

No idea.  Either this was a feature added in later cameras, or a design decision to drop this feature for some models.

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

acnomad

Thanks you very much. I have a great deal to learn. I need to play with it a bit more before asking any more questions.