Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lens info not being displayed on some raw photos. #17050

Open
4 tasks done
stoopdapoop opened this issue Mar 23, 2025 · 1 comment · May be fixed by #17125
Open
4 tasks done

Lens info not being displayed on some raw photos. #17050

stoopdapoop opened this issue Mar 23, 2025 · 1 comment · May be fixed by #17125

Comments

@stoopdapoop
Copy link

stoopdapoop commented Mar 23, 2025

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

Lens info doesn't show up on pictures taken with my Nikon D3300. Other software like RawTherapee shows the name as expected but it's missing in immich.

I've supplied an example image where RawTherapy correctly shows "AF 10-24mm F/3.5-4.5" But this info is not shown in Immich.

The OS that Immich Server is running on

Debian GNU/Linux 12 (bookworm) Arm64

Version of Immich Server

v1.129.0

Version of Immich Mobile App

v1.129.0 build.187

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    volumes:
      # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - /asdf/asdf/Photos:/usr/src/app/libraries:ro
    env_file:
      - .env
    ports:
      - '2283:2283'
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false

  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
    healthcheck:
      disable: false

  redis:
    container_name: immich_redis
    image: docker.io/redis:6.2-alpine@sha256:eaba718fecd1196d88533de7ba49bf903ad33664a92debb24660a922ecd9cac8
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

  database:
    container_name: immich_postgres
    image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
    volumes:
      # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    healthcheck:
      test: >-
        pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1;
        Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --tuples-only --no-align
        --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')";
        echo "checksum failure count is $$Chksum";
        [ "$$Chksum" = '0' ] || exit 1
      interval: 5m
      start_interval: 30s
      start_period: 5m
    command: >-
      postgres
      -c shared_preload_libraries=vectors.so
      -c 'search_path="$$user", public, vectors'
      -c logging_collector=on
      -c max_wal_size=2GB
      -c shared_buffers=512MB
      -c wal_compression=on
    restart: always

volumes:
  model-cache:

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=/place/
# The location where your database files are stored
DB_DATA_LOCATION=./postgres

# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
 TZ=America/Los_Angeles

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secret for postgres. You should change it to a random password
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
DB_PASSWORD=nicetry

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

Reproduction steps

1.Upload raw photo taken with Nikon D3300
2.View picture in timeline, click info button
3.Observe that lens info is not present between Camera model and photo info

Relevant log output

Additional information

Example Photo:
DSC_3918.zip

@Snowknight26
Copy link
Contributor

Snowknight26 commented Mar 24, 2025

exiftool-vendored 28.3.1, which is the current version immich uses, returns the following data:

exiftool.read() | grep lens:

  "LensType": "G VR",
  "Lens": "10-24mm f/3.5-4.5",
  "LensDataVersion": "0204",
  "LensIDNumber": 225,
  "LensFStops": 5.33,
  "LensID": "Unknown (E1 40 19 36 2C 35 DF 0E) Tamron 10-24mm f/3.5-4.5 Di II VC HLD (B023) ?",
  "LensSpec": "10-24mm f/3.5-4.5 G VR",

exiftool-vendored 29.2.0 doesn't give any additional lens info.

If we add the -G1 argumetn, which tells exiftool to also include the tag group that the tag comes from, we get:

  "Nikon:LensType": "G VR",
  "Nikon:Lens": "10-24mm f/3.5-4.5",
  "Nikon:LensDataVersion": "0204",
  "Nikon:LensIDNumber": 225,
  "Composite:LensID": "Unknown (E1 40 19 36 2C 35 DF 0E) Tamron 10-24mm f/3.5-4.5 Di II VC HLD (B023) ?",
  "Composite:LensSpec": "10-24mm f/3.5-4.5 G VR",

The composite tags are ones that exiftool attempts to derive from other values.

immich already reads data from the LensModel tag, though, which apparently Nikon doesn't use.. 😢

We could absolutely have immich read from other tags but which one is correct? In most circumstances I'd argue exiftool's composite LensID is the best source of info but when it contains an unknown lens ID, like the above, it's not so useful.

LensSpec seems like a better fit but then it's missing the manufacturer and it's only applicable to photos from Nikon cameras.

🤷

Edit:
You could still probably post on the exiftool forums with that new unidentified LensID value, E1 40 19 36 2C 35 DF 0E, stating that it is actually the Tamron 10-24mm f/3.5-4.5 Di II VC HLD (B023) if you're 100% sure that's correct. Only thing that seems to be different from the existing ID mapping in exiftool is the last value, which is LensType (4E vs 0E). If they add that mapping, and once exiftool-vendored is updated, that'll fix the value that exiftool/exiftool-vendored reports for LensID, but that would still require a change to immich to read from LensID.

@Snowknight26 Snowknight26 linked a pull request Mar 26, 2025 that will close this issue
9 tasks
@Snowknight26 Snowknight26 linked a pull request Mar 26, 2025 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants