Weird data in Composite:LensID after write from CSV

Started by antkent, August 26, 2024, 07:59:06 PM

Previous topic - Next topic

antkent

I am writing data to new camera scans of old slides and ending up with data in the untouched field "Composite:LensID" being weirdly modified. Here is the simplified process and result:

1. Convert Canon R5 CR3 to DNG (just released Adobe DNG Converter v16.5.0.1954)
Composite:LensID correctly shows "Canon RF 100mm F2.8L MACRO IS USM", XMP:LensID still has "61182"

2. Wipe many fields that have R5 related data with
exiftool -use MWG -Lens= -LensModel= -LensMake= -LensInfo= -ext dng *
along with other fields.
Composite:LensID does not exist (is empty?).  XMP:LensID still has "61182"

3. Write data to the above wiped fields with
exiftool -csv=datain.csv -use MWG -ext dng *
I am adding shooting data from the late 80s/90s (EOS 620 technical back with old EF lenses), including lens make and model, and that is working perfectly.  I wish to retain the data in Composite:LensID so I know which lens was used for the scan. However, after this last step Composite:LensID has wrong (and often multiple) lens info in it like the following examples:

"Canon RF-S 18-150mm F3.5-6.3 IS STM"
"Canon RF 24-105mm F4L IS USM"
"Canon RF 24-240mm F4-6.3 IS USM"
"Canon RF 100-400mm F5.6-8 IS USM or Canon RF 100-400mm F5.6-8 IS USM + RF1.4x or Canon RF 100-400mm F5.6-8 IS USM + RF2x or Canon RF-S 18-150mm F3.5-6.3 IS STM"

And this stunning list:
"Canon RF 50mm F1.2L USM or Canon RF 24-105mm F4L IS USM or Canon RF 28-70mm F2L USM or Canon RF 35mm F1.8 MACRO IS STM or Canon RF 85mm F1.2L USM or Canon RF 85mm F1.2L USM DS or Canon RF 24-70mm F2.8L IS USM or Canon RF 15-35mm F2.8L IS USM or Canon RF 24-240mm F4-6.3 IS USM or Canon RF 70-200mm F2.8L IS USM or Canon RF 85mm F2 MACRO IS STM or Canon RF 600mm F11 IS STM or Canon RF 600mm F11 IS STM + RF1.4x or Canon RF 600mm F11 IS STM + RF2x or Canon RF 800mm F11 IS STM or Canon RF 800mm F11 IS STM + RF1.4x or Canon RF 800mm F11 IS STM + RF2x or Canon RF 24-105mm F4-7.1 IS STM or Canon RF 100-500mm F4.5-7.1L IS USM or Canon RF 100-500mm F4.5-7.1L IS USM + RF1.4x or Canon RF 100-500mm F4.5-7.1L IS USM + RF2x or Canon RF 70-200mm F4L IS USM or Canon RF 100mm F2.8L MACRO IS USM or Canon RF 50mm F1.8 STM or Canon RF 14-35mm F4L IS USM or Canon RF-S 18-45mm F4.5-6.3 IS STM or Canon RF 100-400mm F5.6-8 IS USM or Canon RF 100-400mm F5.6-8 IS USM + RF1.4x or Canon RF 100-400mm F5.6-8 IS USM + RF2x or Canon RF-S 18-150mm F3.5-6.3 IS STM or Canon RF 24mm F1.8 MACRO IS STM or Canon RF 16mm F2.8 STM or Canon RF 400mm F2.8L IS USM or Canon RF 400mm F2.8L IS USM + RF1.4x or Canon RF 400mm F2.8L IS USM + RF2x or Canon RF 600mm F4L IS USM or Canon RF 600mm F4L IS USM + RF1.4x or Canon RF 600mm F4L IS USM + RF2x or Canon RF 800mm F5.6L IS USM or Canon RF 800mm F5.6L IS USM + RF1.4x or Canon RF 800mm F5.6L IS USM + RF2x or Canon RF 1200mm F8L IS USM or Canon RF 1200mm F8L IS USM + RF1.4x or Canon RF 1200mm F8L IS USM + RF2x or Canon RF 5.2mm F2.8L Dual Fisheye 3D VR or Canon RF 15-30mm F4.5-6.3 IS STM or Canon RF 135mm F1.8 L IS USM or Canon RF 24-50mm F4.5-6.3 IS STM or Canon RF-S 55-210mm F5-7.1 IS STM or Canon RF 100-300mm F2.8L IS USM or Canon RF 100-300mm F2.8L IS USM + RF1.4x or Canon RF 100-300mm F2.8L IS USM + RF2x or Canon RF 10-20mm F4 L IS STM or Canon RF 28mm F2.8 STM or Canon RF 24-105mm F2.8 L IS USM Z or Canon RF-S 10-18mm F4.5-6.3 IS STM or Canon RF 35mm F1.4 L VCM"

The "Composite:LensID" field is not in my CSV input file, nor are any of these lenses (most of which I don't even own).

Trying to manually rewrite the correct data to "Composite:LensID" with
exiftool -Composite:LensID=Canon RF100mm F2.8L Macro IS USM -ext dng *
results in
Warning: Sorry, Composite:LensID doesn't exist or isn't writable
Any thoughts about how to fix or avoid this issue?

antkent

#1
The entire wipe command is:

exiftool -use MWG -ApertureValue= -ApproximateFocusDistance= -Artist= -CameraSerialNumber= -Copyright= -DateTimeOriginal= -ExposureCompensation= -ExposureMode= -ExposureProgram= -ExposureTime= -Flash= -FlashCompensation= -FNumber= -FocalLength= -Lens= -LensModel= -LensMake= -LensInfo= -Make= -MaxApertureValue= -Model= -RecommendedExposureIndex= -Rights= -ShutterSpeedValue= -ext dng *

The CSV input fields are:
SourceFile,Rating,Title,Keywords,Location,City,State,Country,Description,Identifier,DateTimeOriginal,CreateDate,ExposureTime,Aperture,ApertureValue,FNumber,ExposureCompensation,MeteringMode,FocalLength,LensMake,Lens,LensModel,MaxApertureValue,ExposureProgram,FlashMode,FlashCompensation,ISO,RecommendedExposureIndex,Source,Make,Model,Creator,Author,AuthorsPosition,CopyrightFlag,Copyright

antkent

#2
Not sure of the root cause of this (assuming some issue related to xmp:lensID), but a workaround I found was to add Composite:LensID field and content to the CSV input file to rewrite the data.   However, this appears to populate "XMP:Lens" from the Composite:LensID field in CSV where there is no historical data to enter, so I am back where I was 3 days ago.  Not a preferred solution!

StarGeek

#3
The Composite:LensID is a Composite tag. That means it doesn't actually exist in the file and is created on the fly by combining multiple tags to get a resulting value, i.e. making a composite out of mulitple tags. If you change any of the underlying tags, then the value of the Composite:LensID tag may change.

See the Composite tags page for which tags might be used to create Composite:LensID. There are multiple possible ways for it to be created. If you want to keep the Composite:LensID, you shouldn't remove any of the tags from which it is created.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

antkent

#4
When I hit that error, I assumed Composite tags were something like that, even though having spent many hours (too many?) reading information about tags, I had not seen that page.

Wanting to keep info about both lenses (film and scan) I played with this a bit more and have found what I think is the best compromise:

1. Ignore the crazy impact on Composite:LensId

2. Using "exiftool -use MWG", wipe LensMake, Lensinfo & LensModel, leaving the Lens tag populated with the scanning lens from the CR3.

3. Using "exiftool -csv=datain.csv -use MWG" populate LensMake, Lensinfo & LensModel with the film data. Lensinfo gets stripped down to just focal length range and maximum aperture(s), but the other two fields are fine. Strangely only the EXIF Lensinfo & LensModel tags are populated (not the XMP) even though I specified "-use MWG" and left the tag name unspecific in the csv.

Thanks for your help!

Phil Harvey

The MWG specification doesn't mention LensMake or LensModel.

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

StarGeek

More specifically, -use MWG only has effect with the 13 composite tags mentioned in the first part of the MWG tags page. The other sections, the Collections, the Keywords hierarchy, and the Regions are independent of the Composite tags and aren't affected by -use MWG.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).