Some lens shown as "Unknown Lens"

While editing some shots, I realized that one lens (Canon EF-S 24mm f/2.8 STM) is shown as “Unknown lens (4154)” in the current DT master (4.5.0+1062) on Windows 11. The second lens I used (Canon EF-S 10-18mm f/4.5-5.6 IS STM) is recognized correctly. The camera is a Canon EOS 850D.

Exiftool returns for the cr3 raw files:

======== ./20231016_113926-_MG_5716.CR3
Lens Info : 24mm f/0
Lens Type : Canon EF-S 24mm f/2.8 STM
Lens Model : EF-S24mm f/2.8 STM
Lens : 24.0 mm
Lens ID : Canon EF-S 24mm f/2.8 STM
Lens : 24.0 mm (35 mm equivalent: 38.7 mm)
======== ./20231016_135137-_MG_6118.CR3
Lens Info : 10-18mm f/0
Lens Type : Canon EF-S 10-18mm f/4.5-5.6 IS STM
Lens Model : EF-S10-18mm f/4.5-5.6 IS STM
Lens : 10.0 - 18.0 mm
Lens ID : Canon EF-S 10-18mm f/4.5-5.6 IS STM
Lens : 10.0 - 18.0 mm (35 mm equivalent: 16.1 - 29.0 mm)

So the information is contained in the files for both lenses and readable. Lensfun is updated and both lenses are supported.

Also Digikam 8.1 shows the lens information correctly. I already tried to delete the xmp file and import the raw file again. Does anybody has an idea how to solve this?

Best regards
Till

Edit: If I create the xmp file with exiftool before importing the image to DT, the lens information is shown correctly.

What does exiv2 say about the file? Darktable doesn’t use exiftool.

I think this could be related to Regression where CR2 Lens ID is no longer read from metadata in 4.4.1 · Issue #14882 · darktable-org/darktable · GitHub

Dear both,

thanks for pointing me to exiv2. Apparently it is related to the open issue with v2.8. exiv2 yields for those images:

Exif.Photo.LensModel Ascii 19 EF-S24mm f/2.8 STM
Exif.CanonCs.LensType Short 1 Unknown Lens (4154)

and

Exif.Canon.LensModel Ascii 138 EF-S10-18mm f/4.5-5.6 IS STM
Exif.CanonCs.LensType Short 1 Canon EF-S 10-18mm f/4.5-5.6 IS STM

respectively. I will follow the issue on github and maybe add to it.

1 Like

As a workaround, create a file named exiv2.ini in your user folder.
In exiv2.ini, write 4154=Canon EF-S 24mm f/2.8 STM

1 Like

Tak så mycket

1 Like