immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
51.42k stars 2.72k forks source link

Duration 0.00 for some videos uploaded from web app #12770

Closed thomasss02 closed 1 month ago

thomasss02 commented 1 month ago

The bug

When i upload videos sent to me by whatsapp via web app they have a duration of 0.00 seconds. This does not happen for videos recorded by me (always from whatsapp) and then uploaded. I tried to regenerate the previews, extract metadata and transcode videos but nothing. Let me know if you need a zip with the video that causes this bug.

The OS that Immich Server is running on

RaspiOS

Version of Immich Server

v1.115.0

Version of Immich Mobile App

v1.115.0

Platform with the issue

Your docker-compose.yml content

name: immich-app

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:release
    volumes:
      - /dockerContainers/immich/upload:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - stack.env
    ports:
      - 8040:3001
    depends_on:
      - redis
      - database
    restart: always
    networks:
      - immichNetwork

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:release
    volumes:
      - /dockerContainers/immich/machine-learning:/cache
    env_file:
      - stack.env
    restart: always
    networks:
      - immichNetwork

  redis:
    container_name: immich_redis
    image: docker.io/redis:6.2-alpine@sha256:d6c2911ac51b289db208767581a5d154544f2b2fe4914ea5056443f62dc6e900
    volumes:
      - /dockerContainers/immich/redis:/data
    restart: always
    networks:
      - immichNetwork
    healthcheck:
      test: redis-cli ping || exit 1

  database:
    container_name: immich_postgres
    image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    env_file:
      - stack.env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - /dockerContainers/immich/postgres:/var/lib/postgresql/data
    restart: always
    networks:
      - immichNetwork
    healthcheck:
      test: pg_isready --dbname='${DB_DATABASE_NAME}' || exit 1; Chksum="$$(psql --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' --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"]

networks:
  immichNetwork:
    driver: bridge
    ipam:
      config:
        - subnet: 10.1.0.0/16
          ip_range: 10.1.0.0/25
          gateway: 10.1.0.1

Your .env content

DB_PASSWORD=**********
DB_HOSTNAME=immich_postgres
DB_USERNAME=**********
DB_DATABASE_NAME=immich
REDIS_HOSTNAME=immich_redis

Reproduction steps

  1. Upload a video received from whatsapp
  2. See video duration 0.00
  3. Upload a video sent on whatsapp
  4. See correct video duration

Relevant log output

No response

Additional information

No response

alextran1502 commented 1 month ago

Hello, thanks for the report! Can you help attach a sample video so we can us to troubleshoot?

mrxorao commented 1 month ago

I also have the problem

AFumi39 commented 1 month ago

Hello, thanks for the report! Can you help attach a sample video so we can us to troubleshoot?

[](url)

thomasss02 commented 1 month ago

Hello, thanks for the report! Can you help attach a sample video so we can us to troubleshoot?

https://github.com/user-attachments/assets/c9003c57-fe5e-4765-9cb0-701e2a26101e

thomasss02 commented 1 month ago

[Nest] 31 - 09/18/2024, 3:48:15 PM LOG [Api:EventRepository] Websocket Disconnect: T_w6PgaHEN44CDZuAAC7 [Nest] 31 - 09/18/2024, 3:48:16 PM LOG [Api:EventRepository] Websocket Connect: QQp7M_e0XU1pJ-gWAAC9 [Nest] 7 - 09/18/2024, 3:48:27 PM WARN [Microservices:MetadataService] Asset a2e16095-ade5-4582-aa26-c7518bc69100 has no valid date (undefined), falling back to asset.fileCreatedAt [Nest] 7 - 09/18/2024, 3:48:27 PM ERROR [Microservices:JobService] Unable to run job handler (metadataExtraction/metadata-extraction): TypeError: exifTags.ModifyDate?.toDate is not a function [Nest] 7 - 09/18/2024, 3:48:27 PM ERROR [Microservices:JobService] TypeError: exifTags.ModifyDate?.toDate is not a function at MetadataService.getDates (/usr/src/app/dist/services/metadata.service.js:508:46) at MetadataService.handleMetadataExtraction (/usr/src/app/dist/services/metadata.service.js:194:80) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async /usr/src/app/dist/services/job.service.js:148:36 at async Worker.processJob (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:394:28) at async Worker.retryIfFailed (/usr/src/app/node_modules/bullmq/dist/cjs/classes/worker.js:581:24) [Nest] 7 - 09/18/2024, 3:48:27 PM ERROR [Microservices:JobService] Object: { "id": "a2e16095-ade5-4582-aa26-c7518bc69100" }

jrasm91 commented 1 month ago

Duplicate of #12634