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

I can't play some videos on iOS #15467

Open
2 of 3 tasks
AlexShavkunov opened this issue Jan 20, 2025 · 7 comments
Open
2 of 3 tasks

I can't play some videos on iOS #15467

AlexShavkunov opened this issue Jan 20, 2025 · 7 comments

Comments

@AlexShavkunov
Copy link

AlexShavkunov commented Jan 20, 2025

The bug

Recently I've deployed Immich to my server and discovered some videos don't play on iOS. For example, I can have two videos on iPhone and I try to play one and that works but the second doesn't.

So I decided to test on different platforms and I used a direct ip and a domain address and I figured out the problem is only on iOS in the app and in a browser (I tested Google Chrome and Safari)

I tried to change "Video Transcoding Settings": video codec - hevc, target resolution - 1080p, constant rate factor - 28, preset - faster. But it can't help and I reset the settings.

Platforms: MacOS (Google Chrome), Android (Google Chrome and the app), iOS (Google Chrome, Safari, the app)
MacOS and Android videos download and play very fast and they don't have any problems

I made a video recording - https://youtube.com/shorts/tLcghvUStyI
What can I do this situation? Help

The OS that Immich Server is running on

Ubuntu 24.04

Version of Immich Server

1.124.2

Version of Immich Mobile App

1.124.0 build. 187

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

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:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - 2283:2283
    depends_on:
      - redis
      - database
    restart: always

  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

  redis:
    container_name: immich_redis
    image: docker.io/redis:6.2-alpine@sha256:e31ca60b18f7e9b78b573d156702471d4eda038803c0b8e6f01559f350031e93
    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:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    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 SUM(checksum_failures) FROM pg_stat_database')"; echo "checks>
      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=./library
# 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=Etc/UTC

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

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

IMMICH_SERVER_URL=https://holy-photos.duckdns.org
IMMICH_WEB_URL=https://holy-photos.duckdns.org

Reproduction steps

  1. Open the app or a browser
  2. Just start any video
  3. Some of the videos play

Relevant log output

The first video json:
{
  "id": 8658,
  "remoteId": "1b47da8a-60a1-420c-9017-c9d222918226",
  "localId": "N/A",
  "checksum": "H0jh8fs6voZpxix9i18WmEYfT84=",
  "ownerId": -5118120626529609837,
  "livePhotoVideoId": "N/A",
  "stackId": "N/A",
  "stackPrimaryAssetId": "N/A",
  "stackCount": "0",
  "fileCreatedAt": "2025-01-20 15:20:48.000",
  "fileModifiedAt": "2025-01-20 15:20:58.000",
  "updatedAt": "2025-01-20 15:42:50.237",
  "durationInSeconds": 8,
  "type": "AssetType.video",
  "fileName": "IMG_4367.MOV",
  "isFavorite": false,
  "isRemote": true,
  "storage": "AssetState.remote",
  "width": 1920,
  "height": 1080,
  "isArchived": false,
  "isTrashed": false,
  "isOffline": false,
}

The second video json: 
{
  "id": 7272,
  "remoteId": "5d3ca683-eb3f-495c-a5c6-9d46fe81b714",
  "localId": "N/A",
  "checksum": "q5UNs1/EUXjepG1k65yanJV1wUU=",
  "ownerId": -5118120626529609837,
  "livePhotoVideoId": "N/A",
  "stackId": "N/A",
  "stackPrimaryAssetId": "N/A",
  "stackCount": "0",
  "fileCreatedAt": "2025-01-20 15:20:00.000",
  "fileModifiedAt": "2025-01-15 15:22:22.000",
  "updatedAt": "2025-01-20 15:35:22.667",
  "durationInSeconds": 8,
  "type": "AssetType.video",
  "fileName": "IMG_1258.MOV",
  "isFavorite": false,
  "isRemote": true,
  "storage": "AssetState.remote",
  "width": 1920,
  "height": 1080,
  "isArchived": false,
  "isTrashed": false,
  "isOffline": false,
}

The third video:
{
  "id": 1450,
  "remoteId": "a7a18022-d828-40ee-bc09-e92d98a6afe3",
  "localId": "N/A",
  "checksum": "9AscUGk9pbMjhmGtRlsS8AVN9Tw=",
  "ownerId": -5118120626529609837,
  "livePhotoVideoId": "N/A",
  "stackId": "N/A",
  "stackPrimaryAssetId": "N/A",
  "stackCount": "0",
  "fileCreatedAt": "2025-01-20 12:36:00.000",
  "fileModifiedAt": "2025-01-15 15:22:19.000",
  "updatedAt": "2025-01-20 15:26:35.257",
  "durationInSeconds": 12,
  "type": "AssetType.video",
  "fileName": "IMG_1072.MOV",
  "isFavorite": false,
  "isRemote": true,
  "storage": "AssetState.remote",
  "width": 1920,
  "height": 1080,
  "isArchived": false,
  "isTrashed": false,
  "isOffline": false,
}

Additional information

No response

@mmomjian
Copy link
Contributor

This doesn’t seem like a bug to me, more likely an encoding issue, but I’ll see if someone else can chime in.

@AlexShavkunov
Copy link
Author

@mmomjian okay, sorry for sending the report to the wrong place. But how can I decide it?

@bo0tzz
Copy link
Member

bo0tzz commented Jan 20, 2025

How are you connected to the Immich server? Any reverse proxy, extra authentication, etc? After messing with the transcoding settings, did you rerun the transcoding job for these assets?

@AlexShavkunov
Copy link
Author

@bo0tzz I connected to a direct ip address and a domain name. I use Nginx Proxy Manager, but I tried to stop NPM on a docker and it didn't help me. No, I didn't rerun the transcoding job. I'll be later to answer it helps or not

@AlexShavkunov
Copy link
Author

@bo0tzz I've added the transcoding settings again and then re-ran and it doesn't work at all. All videos which didn't play before still don't play

These are my settings on screenshots

Image Image Image

@alextran1502
Copy link
Contributor

If it doesn't work on the web as well, I suggest you set the transcoding settings back to default, retranscode them, and try again. If it doesn't work, then the video might be the issue

@AlexShavkunov
Copy link
Author

Unfortunately the default or the custom settings are not working and I think videos have not any issues because they work on iCloud or Google Photos correctly and fast. While there are freezes only in Immich

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

No branches or pull requests

4 participants