Writing "Nikon" metadata on Z7+FTZ adapter files

Started by johnvanatta, December 10, 2018, 05:00:35 PM

Previous topic - Next topic

johnvanatta

I'm trying to get Capture One to recognize the proper lens metadata for Z7 raw files. When the FTZ adapter is attached, Nikon doesn't seem to be writing very much metadata to the raws. I'm hoping to add it in myself.

One field Capture One seems to be relying on is the 8 bit Nikon Lens ID. I can adjust it on a DSLR raw file like this:

exiftool -overwrite_original -P -Nikon:LensIdNumber#="169" fixme.NEF

But that doesn't work on a Z7 raw. It seems the whole "Nikon" block of metadata doesn't exist. Based on this thread

https://exiftool.org/forum/index.php?topic=9680.0

What I'm trying may simply not be possible? The Nikon raw metadata format is too rigid to allow adding fields wherever I please?

Phil Harvey

I get this for a Z7 NEF file:

> exiftool ../pics/NikonZ7.nef -a -G1 -s "-*lens*"
[Nikon]         LensType                        : AF
[Nikon]         Lens                            : 35mm f/1.8
[Nikon]         LensFStops                      : 6.33
[Nikon]         LensDataVersion                 : 0800
[ExifIFD]       LensInfo                        : 35mm f/1.8
[ExifIFD]       LensMake                        : NIKON
[ExifIFD]       LensModel                       : NIKKOR Z 35mm f/1.8 S
[ExifIFD]       LensSerialNumber                : 20004219
[Composite]     LensSpec                        : 35mm f/1.8 AF


So it does contain the Nikon lens information.  But there are a number of tags besides these that are used by ExifTool to determine the lens model for Nikons.  See here for details.  But I don't know what tags CaptureOne looks at.

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

johnvanatta

#2
That's with a native Z lens, which seem to get more metadata written. Why Nikon is skimping on their supposedly "fully compatible" F adapted lenses is a mystery to me. Here's the output from a 20/1.8G F-mount on the FTZ adapter:


exiftool virgin20.NEF -a -G1 -s "-*lens*"
[Nikon]         LensType                        : G
[Nikon]         Lens                            : 20mm f/1.8
[Nikon]         LensFStops                      : 6.33
[Nikon]         LensDataVersion                 : 0800
[ExifIFD]       LensInfo                        : 20mm f/1.8
[ExifIFD]       LensMake                        :
[ExifIFD]       LensModel                       :
[ExifIFD]       LensSerialNumber                :
[Composite]     LensSpec                        : 20mm f/1.8 G


Crucially, LensIdNumber doesn't seem to get written. I know that's one of the fields Capture 1 uses. I was trying to add it in directly, but maybe that's the wrong approach? Can I write the entire hex string at once? Something like this maybe?

exiftool -overwrite_original -P -Nikon:LensID#='A9 4C 31 31 14 14 C4 06' fixme.NEF

Which gives a "Warning: Sorry, Nikon:LensID doesn't exist or isn't writable". 

johnvanatta

Rooting around a bit more, it appears that a great deal of the Nikon fields are getting written. Conspicuously absent are the ones that combine for the LensID field. Of the eight, only LensFStops and LensType are present and accounted for.

Phil Harvey

You're right.  I didn't look at this closely enough yesterday.  I need to sit down and spend some time decoding the Z6/Z7 NEF metadata.  The lens information has changed.

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

Phil Harvey

I'm going to need more Z7 samples to be able to decode this.  Could you possibly send me a small JPEG sample from each of your lens combinations?  My email is philharvey66 at gmail.com

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

Phil Harvey

Scratch that.  I don't need any samples.  I managed to download enough from the internet.

The next ExifTool release (11.22) will decode LensData tags for the Z6/Z7.

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

johnvanatta

Great news. I guess I didn't realize how much this information isn't simply being read, it has to be reverse engineered first. Thanks for all the work you're doing.

On the downside, if the lens information is present in the files, it means Capture 1 needs to read it--so I'll probably have to wait until they update. Ah well.