ExifTool Forum

ExifTool => Newbies => Topic started by: romanholiday on August 21, 2022, 01:44:44 AM

Title: Need help to add Lens Type to Sony A7R IV
Post by: romanholiday on August 21, 2022, 01:44:44 AM
Hi,

I am using a fully manual Chinese lens with no EXIF information whatsoever. All I want to do is to add the type of lens used, so that I remember which lens was used. I tried:-

exiftool '-LensType=Laowa 9mm Ultra Wide' *

And it gave an error.

So how do I do it?

Thanks!  :)
Title: Re: Need help to add Lens Type to Sony A7R IV
Post by: StarGeek on August 21, 2022, 12:37:23 PM
LensType, except in the case of some MakerNotes, is usually not writable.  Additionally, it can only be set to specific values, not arbitrary strings.

The tags you probably want to write are LensMake/LensModel

The definitions of these are
LensMake : This tag records the lens manufacturer
LensModel : This tag records the lens's model name and model number
Title: Re: Need help to add Lens Type to Sony A7R IV
Post by: romanholiday on August 21, 2022, 03:42:47 PM
It works!!!  ;D

Thank you StarGeek. I just added the LensModel tag:-

exiftool '-LensModel= Laowa 9mm Ultra Wide' test-photo.ARW

And I got this:-

Warning: [minor] Oversized SubIFD StripByteCounts (122419200 bytes, but expected 107116800) - test-photo.ARW
    1 image files updated

Should I worry about the warning?  ???
Title: Re: Need help to add Lens Type to Sony A7R IV
Post by: StarGeek on August 21, 2022, 04:17:07 PM
In a previous post, Phil said
Quote from: Phil Harvey on September 21, 2021, 02:05:44 PMThis warning is not uncommon, and may safely be ignored.  It indicates there is more data in the image strips than there should be.  It seems that some cameras write extra padding or something.  However, Undersized data is a problem, so the warning isn't minor in this case.

- Phil

So it should be ok as there is more data than what was expected.

Though personally, I am bit cautious when it comes to even minor warnings in RAW file types and I would make sure you have proper backups and test some of the files afterwards.
Title: Re: Need help to add Lens Type to Sony A7R IV
Post by: romanholiday on August 21, 2022, 05:44:26 PM
The files seem to work fine, but I have kept backups of the originals anyway.

One more quick question. Is there a way to write tags without changing the file's modified date? So that when I am browsing the files the date of the files remains the same as the original?

Thanks.

P.S. I tried -P and it didn't work: exiftool -P '-LensModel= Laowa 9mm Ultra Wide' test-photo.ARW
Title: Re: Need help to add Lens Type to Sony A7R IV
Post by: Phil Harvey on August 21, 2022, 09:09:39 PM
-P is the correct option.  The system file modification date/time (shown as the ExifTool FileModifyDate tag) shouldn't change when you use this.

- Phil