immich-app / immich

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

MOV Files cant be handled by Media Repository Service because the extension is set wrong #8022

Open dotcfg opened 3 months ago

dotcfg commented 3 months ago

The bug

immich_microservices     | [Nest] 7  - 03/17/2024, 1:56:11 PM   ERROR [MediaRepository] ffmpeg version 6.0.1-Jellyfin Copyright (c) 2000-2023 the FFmpeg developers
immich_microservices     |   built with gcc 12 (Debian 12.2.0-14)
immich_microservices     |   configuration: --prefix=/usr/lib/jellyfin-ffmpeg --target-os=linux --extra-version=Jellyfin --disable-doc --disable-ffplay --disable-ptx-compression --disable-static --disable-libxcb --disable-sdl2 --disable-xlib --enable-lto --enable-gpl --enable-version3 --enable-shared --enable-gmp --enable-gnutls --enable-chromaprint --enable-opencl --enable-libdrm --enable-libass --enable-libfreetype --enable-libfribidi --enable-libfontconfig --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libopenmpt --enable-libdav1d --enable-libsvtav1 --enable-libwebp --enable-libvpx --enable-libx264 --enable-libx265 --enable-libzvbi --enable-libzimg --enable-libfdk-aac --arch=amd64 --enable-libshaderc --enable-libplacebo --enable-vulkan --enable-vaapi --enable-amf --enable-libvpl --enable-ffnvcodec --enable-cuda --enable-cuda-llvm --enable-cuvid --enable-nvdec --enable-nvenc
immich_microservices     |   libavutil      58.  2.100 / 58.  2.100
immich_microservices     |   libavcodec     60.  3.100 / 60.  3.100
immich_microservices     |   libavformat    60.  3.100 / 60.  3.100
immich_microservices     |   libavdevice    60.  1.100 / 60.  1.100
immich_microservices     |   libavfilter     9.  3.100 /  9.  3.100
immich_microservices     |   libswscale      7.  1.100 /  7.  1.100
immich_microservices     |   libswresample   4. 10.100 /  4. 10.100
immich_microservices     |   libpostproc    57.  1.100 / 57.  1.100
immich_microservices     | upload/library/admin/2024/February-20/IMG_2719.MOV.mov: No such file or directory
immich_microservices     | 
immich_microservices     | [Nest] 7  - 03/17/2024, 1:56:11 PM   ERROR [JobService] Unable to run job handler (thumbnailGeneration/generate-jpeg-thumbnail): Error: ffmpeg exited with code 1: upload/library/admin/2024/February-20/IMG_2719.MOV.mov: No such file or directory
immich_microservices     | 
immich_microservices     | [Nest] 7  - 03/17/2024, 1:56:11 PM   ERROR [JobService] Error: ffmpeg exited with code 1: upload/library/admin/2024/February-20/IMG_2719.MOV.mov: No such file or directory
immich_microservices     | 
immich_microservices     |     at ChildProcess.<anonymous> (/usr/src/app/node_modules/fluent-ffmpeg/lib/processor.js:182:22)
immich_microservices     |     at ChildProcess.emit (node:events:518:28)
immich_microservices     |     at ChildProcess._handle.onexit (node:internal/child_process:294:12)
immich_microservices     | [Nest] 7  - 03/17/2024, 1:56:11 PM   ERROR [JobService] Object:
immich_microservices     | {
immich_microservices     |   "id": "6cdf4d51-f130-442b-9c32-09a481e74eed",
immich_microservices     |   "source": "upload"
immich_microservices     | }

The OS that Immich Server is running on

Debian 12

Version of Immich Server

v1.98.2

Version of Immich Mobile App

v1.98.2 build.144

Platform with the issue

Your docker-compose.yml content

version: '3.8'

#
# 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:
  server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    command: ['start.sh', 'immich']
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - 2100:3001
    depends_on:
      - redis
      - database
    restart: always

  microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    command: ['start.sh', 'microservices']
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    depends_on:
      - redis
      - database
    restart: always

  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:
      - ./binds/model-cache:/cache
    env_file:
      - .env
    restart: always

  redis:
    container_name: immich_redis
    image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5
    restart: always

  database:
    container_name: immich_postgres
    image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - ./binds/pgdata:/var/lib/postgresql/data
    restart: always

  backups:
    container_name: immich_db_dumper
    image: prodrigestivill/postgres-backup-local
    env_file:
      - .env
    environment:
      POSTGRES_HOST: database
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      SCHEDULE: "@daily"
      BACKUP_DIR: /db_dumps
    volumes:
      - ./binds/db_dumps:/db_dumps
    depends_on:
      - database
x-dockge:
  urls:
    - "https://photos.lan.virtualized.app"

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=./binds/library

# 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
DB_PASSWORD=YouWontGetItHaHa

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

REDIS_HOSTNAME=immich_redis

Reproduction steps

1.Using mobile iOS app
2.upload .MOV files with CAPS LOCK .MOV extension
3.watch logs and wait for fails
...

Additional information

anyone can reproduce it? its a fresh installed immich instance.

aviv926 commented 3 months ago

upload/library/admin/2024/February-20/IMG_2719.MOV.mov Seems like an odd suffix, is that something you set in your storage template by any chance?

Can you provide a sample file that we can test?

bbgth commented 1 month ago

Seems like an odd suffix

I noticed that mine is doing this as well. It only happens on live photos that has been uploaded by iOS client. I am currently on v1.105.0 client with v1.105.1 server

It doesn't seem to impact anything besides being a cosmetic issue with the double .MOV.mov

I suspect it is something to do with the iOS client

aalfrey-sys commented 1 month ago

I am seeing this same behavior. My storage template is set as: }, "storageTemplate": { "enabled": true, "hashVerificationEnabled": true, "template": "{{y}}/{{y}}-{{MM}}/{{filename}}" }, Example files image

sirxsniper commented 2 days ago

I have something similar but in my case the file is there but:

The file in the folder: /photos/library/6ba1d193-f058-4247-a025-c90bcd9f111c/2022/Jan/IMG_0581.MOV

Missing file: /photos/library/6ba1d193-f058-4247-a025-c90bcd9f111c/2022/Jan/IMG_0581.mov

image