trying to replace the lensID value, but nothing gets written.

Started by lo lite, April 25, 2015, 10:03:26 PM

Previous topic - Next topic

lo lite

Hi,

I did the following:

exiftool -n -m -o changed/ -if '$lensID eq 165' -lensID='131' /Volumes/Master/Pictures/Canon\ Raw/EOS5DMK3\ 1_5000\ -\ 1_5999


to change the lensID of some pictures from 165 (Canon EF 70-200 f/2.8 L USM or the old Sigma 70-200mm f/2.8 APO EX HSM (according to http://www.exiftool.org/TagNames/Canon.html#LensType)) to 131 (newer versions of the Sigma 70-200mm f/2.8 APO EX HSM).

exiftool reported success:


    1 directories scanned
    1 directories created
   59 files failed condition
   33 image files created


but when I check the files afterwards I always see the original value, 165, not 131:

MBP15:~ lars$ exiftool -n -lensID changed/
======== changed/IMG_EOS5DMK3_1_5061.CR2
Lens ID                         : 165
======== changed/IMG_EOS5DMK3_1_5062.CR2
Lens ID                         : 165
======== changed/IMG_EOS5DMK3_1_5093.CR2
Lens ID                         : 165
    1 directories scanned
   33 image files read


What I am doing wrong? I also tried omitting the single "'" around the 131, did not work.

Thanks in advance!

StarGeek

I believe LensID is a composite tag and not writable.  I think the tag you want to look at is LensType (and maybe LensModel as well). 
"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

Hayo Baan

Add -G0:1 to your command line to see what group the tags are in. LensID is indeed a composite tag and therefore can't be written. LensType is the tag you're after, but as some ids are used for multiple lenses, you may need to change some other fields that determine the specific lens in this case as well.

Hope this helps,
Hayo
Hayo Baan – Photography
Web: www.hayobaan.nl

lo lite

Thanks for the head ups, you encouraged me to dig deeper into exiftool and I found a solution:

exiftool -n -o changed/ -if '$lensType eq 165' -n -MakerNotes:LensType="131" -MakerNotes:LensModel="70-200mm" /Volumes/Master/Pictures/Canon\ Raw/EOS5DMK3\ 1_5000\ -\ 1_5999/

First I had to learn about the right tag group for the lensType tag, what let me change the lens type from 165 = Canon EF 70-200mm f/2.8 L to 131.7 = Sigma 70-200mm f/2.8 APO EX HSM, which is right.

The second lesson learned was that having just the lensID / lensType set to 131 is not sufficient, DxO OpticsPro will still miss-recognize the CR2 as shot with the Canon EF 70-200mm f/2.8 L . So I had to look further and found out that you must also change the tag MakerNotes:LensModel to plain "70-200mm" from before "EF70-200mm f/2.8L USM".

If all this is the case, DxO OpticsPro will recognize the Sigma 70-200mm f/2.8 APO DG EX HSM which is optically identical to my ancient (from film days) Sigma 70-200mm f/2.8 APO EX HSM which identifies itself wrongly as Canon EF 70-200mm f/2.8 L

http://www.exiftool.org/TagNames/Canon.html#LensType

Hayo Baan

Excellent, glad it helped. And now I also understand why you wanted to change the lens id in the first place  8)
Hayo Baan – Photography
Web: www.hayobaan.nl