Skip to content

some transcoded videos are corrupted when downloaded #26177

@ilobilo

Description

@ilobilo

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

  • Yes

The bug

I tried to send and embed a video to discord and I noticed that it stopped playing after a few seconds, so I downloaded the video with wget and tried to play it. media player couldn't play it for more than a few seconds either. I also tried to re-encode it with ffmpeg but it found the file corrupted.

I tried to encode them with vaapi as well, but it resulted in corrupted files as well.

the videos play in the browser fine, both in the immich library and from a shared link.

here are the original and transcoded videos, as well as immich config file:

original: https://github.com/user-attachments/assets/e15c2b7d-de2b-4519-b55a-b78574668026
transcoded: https://github.com/user-attachments/assets/11c0e185-75e7-46dd-8421-f501f8c7fa91

immich-config.json

The OS that Immich Server is running on

Fedora 43 (both the api and microservices/ML servers)

Version of Immich Server

v2.5.6

Version of Immich Mobile App

not relevant

Platform with the issue

  • Server
  • Web
  • Mobile

Device make and model

No response

Your docker-compose.yml content

docker-compose.yml file running the api on libre computer sweet potato sbc:

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    security_opt:
      - label=disable
    # 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}:/data
      - /etc/localtime:/etc/localtime:ro
      - /mnt/data/media/family:/mnt/data/media/family:ro
      - /mnt/data/media/memes:/mnt/data/media/memes
    env_file:
      - .env
    ports:
      - '2283:2283'
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false

  redis:
    container_name: immich_redis
    image: docker.io/valkey/valkey:9@sha256:546304417feac0874c3dd576e0952c6bb8f06bb4093ea0c9ca303c73cf458f63
    healthcheck:
      test: redis-cli ping || exit 1
    ports:
      - "6379:6379"
    restart: always

  database:
    container_name: immich_postgres
    image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
      # Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs
      # DB_STORAGE_TYPE: 'HDD'
    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
    shm_size: 128mb
    ports:
      - "5432:5432"
    restart: always
    healthcheck:
      disable: false

  immich-public-proxy:
      image: alangrainger/immich-public-proxy:latest
      container_name: immich-public-proxy
      restart: always
      depends_on:
        - immich-server
      ports:
        - "3003:3000"
      environment:
        PUBLIC_BASE_URL: https://removed-for-privacy.com
        IMMICH_URL: http://host.containers.internal:2283
      healthcheck:
        test: curl -s http://localhost:3000/share/healthcheck -o /dev/null || exit 1
        start_period: 10s
        timeout: 5s

# volumes:
  # model-cache:





docker-compose.yml file that handles the microservices on my pc:

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    security_opt:
      - label=disable
    # 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}:/data
      - /opt/immich-video-transcoding/media/family:/mnt/data/media/family:ro
      - /opt/immich-video-transcoding/media/memes:/mnt/data/media/memes
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - '2283:2283'
    restart: always
    healthcheck:
      disable: false



docker-compose.yml that handles machine learning:

name: immich_remote_ml

services:
  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends:
      # file: hwaccel.ml.yml
      # service: rocm # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    restart: always
    ports:
      - 3003:3003

volumes:
  model-cache:

Your .env content

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

# The location where your uploaded files are stored
UPLOAD_LOCATION=./library

# The location where your database files are stored. Network shares are not supported for the database
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=Removed/Privacy

# The Immich version to use. You can pin this to a specific version like "v2.1.0"
IMMICH_VERSION=v2

# 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=postgres

IMMICH_WORKERS_INCLUDE='api'

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



.env for the video transcoding server has  DB_HOSTNAME, REDIS_HOSTNAME and IMMICH_WORKERS_INCLUDE='microservices' added

Reproduction steps

  1. have my hardware and setup
  2. transcode a video
  3. share it (I'm not sure if this step is necessary)
  4. download the transcoded video
  5. try to play it

Relevant log output

I don't know if this is relevant (it happened only once but I have tried transcoding and downloading multiple times):

[Nest] 18  - 02/12/2026, 10:21:02 PM   ERROR [Api:LoggingRepository~0lqvfj5d] Unable to send file: RangeNotSatisfiableError: Range Not Satisfiable
RangeNotSatisfiableError: Range Not Satisfiable
    at createHttpError (/usr/src/app/server/node_modules/.pnpm/send@1.2.1/node_modules/send/index.js:866:7)
    at SendStream.error (/usr/src/app/server/node_modules/.pnpm/send@1.2.1/node_modules/send/index.js:168:31)
    at SendStream.send (/usr/src/app/server/node_modules/.pnpm/send@1.2.1/node_modules/send/index.js:554:19)
    at onstat (/usr/src/app/server/node_modules/.pnpm/send@1.2.1/node_modules/send/index.js:615:10)
    at FSReqCallback.oncomplete (node:fs:196:5)
[Nest] 18  - 02/12/2026, 10:21:02 PM   ERROR [Api:GlobalExceptionFilter~0lqvfj5d] Unknown error: RangeNotSatisfiableError: Range Not Satisfiable
RangeNotSatisfiableError: Range Not Satisfiable
    at createHttpError (/usr/src/app/server/node_modules/.pnpm/send@1.2.1/node_modules/send/index.js:866:7)
    at SendStream.error (/usr/src/app/server/node_modules/.pnpm/send@1.2.1/node_modules/send/index.js:168:31)
    at SendStream.send (/usr/src/app/server/node_modules/.pnpm/send@1.2.1/node_modules/send/index.js:554:19)
    at onstat (/usr/src/app/server/node_modules/.pnpm/send@1.2.1/node_modules/send/index.js:615:10)
    at FSReqCallback.oncomplete (node:fs:196:5)

no errors on the transcoding server, just normal output. example:

[Nest] 2  - 02/13/2026, 2:09:44 AM     LOG [Microservices:MediaService] Transcoding video 88ea4aa4-735e-4904-be2d-5b29c1dec49e without hardware acceleration
[Nest] 2  - 02/13/2026, 2:09:46 AM     LOG [Microservices:MediaService] Successfully encoded 88ea4aa4-735e-4904-be2d-5b29c1dec49e

Additional information

when using vaapi with a particular video, nothing past ~1 second mark played. with software transcoding, it went up to ~7 seconds. curious, huh?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions