immich
immich copied to clipboard
iOS Live Photo
The bug
Live Photos in iOS App not showing correctly. There are 2 files shown, one with an image and the other one is black with a "!" in it. On Safari and other web browsers live photo is shown correctly.
The OS that Immich Server is running on
Docker, Ubuntu 22.10
Version of Immich Server
v1.127.0
Version of Immich Mobile App
v.1.127.0
Platform with the issue
- [ ] Server
- [ ] Web
- [x] 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}
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
- ${EXTERNAL_PATH}:/usr/src/app/external/:ro
- ${EXTERNAL_PATH_...}:/usr/src/app/external/:ro
env_file:
- .env
extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding
file: hwaccel.transcoding.yml
service: quicksync # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
ports:
- 2283:2283
security_opt:
- "label=disable"
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}-openvino
# extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
# file: hwaccel.ml.yml
# service: openvino # 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: 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:
- pgdata:/var/lib/postgresql/data
#
# 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}
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
- ${EXTERNAL_PATH}:/usr/src/app/external/:ro
- ${EXTERNAL_PATH_....}:/usr/src/app/external/:ro
env_file:
- .env
extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding
file: hwaccel.transcoding.yml
service: quicksync # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
ports:
- 2283:2283
security_opt:
- "label=disable"
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}-openvino
# extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
# file: hwaccel.ml.yml
# service: openvino # 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: 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:
- pgdata:/var/lib/postgresql/data
restart: always
immich-folder-album-creator:
container_name: immich_folder_album_creator
image: salvoxia/immich-folder-album-creator:latest
restart: unless-stopped
environment:
API_URL: http://192.168.1.5:2283/api
API_KEY: j3qIV2W9ZjdQGYYl5sVHZrXx1oWcNw3NbilbaBmLzI
ROOT_PATH: /usr/src/app/external/
CRON_EXPRESSION: "*/5 * * * *"
TZ: Europe/Berlin
ALBUM_LEVELS: 10
ALBUM_SEPARATOR: " - "
immich-folder-album-creator_f:
container_name: immich_folder_album_creator_f
image: salvoxia/immich-folder-album-creator:latest
restart: unless-stopped
environment:
API_URL: http://192.168.1.5:2283/api
API_KEY: WSMecMt7itoDCYQAADKQcWQjJ2xhwBqRmgNZ48R0
ROOT_PATH: /usr/src/app/external/
CRON_EXPRESSION: "*/5 * * * *"
TZ: Europe/Berlin
ALBUM_LEVELS: 10
ALBUM_SEPARATOR: " - "
volumes:
pgdata:
model-cache:
restart: always
immich-folder-album-creator:
container_name: immich_folder_album_creator
image: salvoxia/immich-folder-album-creator:latest
restart: unless-stopped
environment:
API_URL: http://192.168.1.5:2283/api
API_KEY: j3qIV2W9ZjdQGYYl5sVHZrXx1oWcNw3NbilbaBmLzI
ROOT_PATH: /usr/src/app/external/
CRON_EXPRESSION: "*/5 * * * *"
TZ: Europe/Berlin
ALBUM_LEVELS: 10
ALBUM_SEPARATOR: " - "
immich-folder-album-creator_f:
container_name: immich_folder_album_creator_f
image: salvoxia/immich-folder-album-creator:latest
restart: unless-stopped
environment:
API_URL: http://192.168.1.5:2283/api
API_KEY: WSMecMt7itoDCYQAADKQcWQjJ2xhwBqRmgNZ48R0
ROOT_PATH: /usr/src/app/external/
CRON_EXPRESSION: "*/5 * * * *"
TZ: Europe/Berlin
ALBUM_LEVELS: 10
ALBUM_SEPARATOR: " - "
volumes:
pgdata:
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=/mnt/.../Photos/immich-lib
# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=
# Connection secret for postgres. You should change it to a random password
DB_PASSWORD=...
# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=...
DB_DATABASE_NAME=..
REDIS_HOSTNAME=immich_redis
EXTERNAL_PATH=/mnt/.../Photos/Bilder
EXTERNAL_PATH_...=/mnt/../Bilder
MACHINE_LEARNING_WORKER_TIMEOUT=600
Reproduction steps
...
Relevant log output
Additional information
No response
Please provide more info. Does it display correctly on the web? Is it still broken if you log out and back in?
sorry just updated my first post. it is shown correctly on any web browser. Logout and login did not change the problem.
it looks like this
I first noticed it with 1.126.0. After that i decided to just wait the next update. but with 1.127.0 the problem still exists
iOS Version 18.3.1
Are these files coming from external library as separate files?
yes correct..
I have the same issue. For me the problem only shows up when I create the album structure using immich-folder-album-creator. The live photo gets separated with the same name. Snapshot saved my day
Maintainer of said script here. I don't really see how the Folder Album Creator could cause this issue. All it does is using API calls to create albums and add assets to said albums. @jrondo Are you saying you don't have this issue when you create an album manually and add a live photo to it? Does the problem only occur when the live photo was added to an album by the script and you view the photo in the album, or also when viewing it in the timeline?
I'm not familiar with live photos at all, so I cannot rule out it has something to do with the script. If I understand correctly, live photos are a still image (HEIC) and a video component (mov or HEVC). The only thing I can think of is that a problem might occur if only one of these assets are added to the album while the other is not, but Folder Album Creator does not differentiate on a file level, only on folder level. Also, I don't know if live photos are represented as a single asset in Immich or as multiple assets.
and how could the folder creator cause this issue if pictures in a webbrowser showing correct? the web view does use the same albums
I have the same problem -- but with my own script that creates albums.
I have not conclusively tracked down the problem, but have noticed that the search api returns two assets for Live Photos, an image and a video. My script in turn (naively) adds each asset separately to the album. Maybe having both parts separately added to the album is tripping up the IOS app?
@RobWW If it works for you when manually adding a live photo to an album in the web interface, you could observe the network calls from your browser to the API to see if it does something special for live photos.
I also have this issue, it is still persistent with the current v1.128.0. I described the behavior in this issue. I feel that it definitely must be related to the creation of albums from external libraries, but I'm afraid I'm lacking programming experience preventing me to dig deeper into the cause of the problem.
@Salvoxia I tried your suggesting of testing in the browser:
When viewing a live photo (id': '02cb1ad1-395c-4985-a849-cc7037114df9), with the browser URL: http://192.168.1.84:2283/photos/02cb1ad1-395c-4985-a849-cc7037114df9
Selecting the 3 dots -> Add to album produced only one api call:
PUT: /api/albums/e731c42d-9e44-4026-b80c-8548cee8e7fe/assets with Request JSON: {"ids":["02cb1ad1-395c-4985-a849-cc7037114df9"]}
I did not see any call for the video part of the file.
As a quick test I removed all videos from all albums: Using the following apis calls (in pseudocode):
for each assets with type VIDEO: get all albums the asset belongs to: data = {'assetId': id} r = requests.get(apiUrl + 'api/albums', params = data, **requests_kwargs)
for each album, remove the asset: data = {'ids':[assetID]} r = requests.delete(apiUrl + 'api/albums/' + f"{albumID}" + '/assets', json=data, **requests_kwargs)
This worked, live photos no longer have duplicate icons. However, for live photos my script had originally added to albums, I had to run several jobs: rescanning the external library, updating metadata, generating thumbnails and transcoding video to get the video part of the live photos to play without the error 'No video with supported format and MIME type found". (Live photos not in albums or added to albums with the web interface always played successfully.) I am not sure why this simple change was causing so much disruption, some documentation on managing live photos would really help.
In terms of fixing the album script, I am not sure what best the solution is. The immich api easily maps from live photo images to the corresponding video (each image has a 'livePhotoVideoId' value that points to the video), but I cannot find a parameter in video files that indicate they are part of a live photo, and not just an independent video.
Any news how to fix it?
in the other issue EricChen1248 mentions a possible solution "Once I updated my script to preemptively handle live photos to only add the image part to an album now everything displays as expected. On both web and mobile, only one single image shows in the gallery with all thumbnails showing, and clicking into the image, it is able to play the video as a live photo." https://github.com/immich-app/immich/issues/2665#issuecomment-2567314814
i am also seeing the same issue with the web versions showing live photos fine but ios showing the live photo and the video with a black thumbnail separately. I have also created albums with @Salvoxia 's https://github.com/Salvoxia/immich-folder-album-creator (Thank you very much for this)
/le did a test and removed in ios the .mov from the album and both the web version and the ios version still worked with showing the live photo as intended
@tzapu Thanks for the hint! I reopened issue https://github.com/Salvoxia/immich-folder-album-creator/issues/128 on my end and added a comment. Could you and @RobWW (or anyone experiencing this issue with Folder Album Creator) please drop by there?
whatever gets changed in immich-folder-album-creator doesn t change that there is some inconsistency on how immich itself lists/views the heic/mov combo on the web and in the ios app. for the same listing the web version looks perfect, ios app shows the video as a separate entity even if it is part of a live photo like described in this issue
I'd like to point out that this display problem also affects the Immich Android App. There it does not seem to make any difference whether the live photo is added to an album or not, it is shown as two separate assets in the main timeline as well as in albums (if both assets are added to an album using the API).
Using a browser, everything looks fine.
Main Timeline on Android (App and Server v1.129.0):
Album created via API, images and videos added to the album:
I'm also affected by this issue but have never used Album Creator, for what it's worth. I did however have immich-go create albums out of folders I'd downloaded from Google Photos which contained live photos. Not sure if related.
See attached what my timeline looks like via the WebUI and via iOS - showing the same exclamation points others have highlighted.
Not sure if my issue same, but in 1.130.3 live photos broken: video and image are not combined into 1 item. I don't use folder creator. In logs I see "Missing file creation or modification date for asset" for heic file and it's video.
@AlexanderIlyanok do you know how do you upload those LivePhotos?
@AlexanderIlyanok do you know how do you upload those LivePhotos?
Yes, its external lib. Just copied them to folder from iPhone. Attached photo with issue. It seems, Alex you have fixed such issue earlier.
Normal Live Photos are still working for m with 1.130.3 but I always get the warning:
WARN [Microservices:MetadataService] Missing file creation or modification date for asset ....
for both, MOV and HEIC file. But at the end the date is okay in the browser and app. Exif data is also good.
What's broken for me are special live photos, which using the bounce effect for example (they are automtaically in the iOS album Animated) If I upload them via iOS Immich app (I'm refering only to uploads via app), no date can be infered and the get the current date.
I've reverted the server to 1.129.0 and the issue is gone: No warning and always correct date assignment, even for the animated live photos (with bounce effect).
The wrong date assignment doesn't happen if I upload via web. Only via iOS App (1.130.3).
@AlexanderIlyanok your files do not match together
➜ immich-test-files exiftool alex/IMG_0688.JPG | grep Content
Content Identifier : 377AA472-DFCB-4EC2-A8EC-356B5408C3B3
➜ immich-test-files exiftool alex/IMG_0688.MOV | grep Content
Content Identifier : 520C1DA1-D13D-4215-AC91-CBF509762650
Content Identifier must be the same for the image and video.
@AlexanderIlyanok your files do not match together
➜ immich-test-files exiftool alex/IMG_0688.JPG | grep Content Content Identifier : 377AA472-DFCB-4EC2-A8EC-356B5408C3B3 ➜ immich-test-files exiftool alex/IMG_0688.MOV | grep Content Content Identifier : 520C1DA1-D13D-4215-AC91-CBF509762650
Content Identifiermust be the same for the image and video.
File name is same, so I think both files are from 1 live photo. I downloaded them from immich, could it break this identifier some way?
@AlexanderIlyanok file name doesn't matter. Do you still have original files on your phone? You can send them via air drop (just enable in the options to send all data) after you select the photo and before sending
Just checked with exiftool several new files, Content Identifier is same and they imported correctly. I don't have copies of old files, so can't check their original exif. Don't understand how it could be broken. I have about 1000 files in current folder with broken Content attribute. Is any guid how to fix them in batch?
I also have the same issue, the web seems okay whereas the iOS app shows the Live videos separately. App version 1.131.3 build.201. The images were imported using immich-cli
@Fethbita can you try log out and log back in?
Still the same after logging out and back in. The timeline appears and after a second, the videos also appear.
@alextran1502 I can also confirm this issue. I am using Salvoxia's immich-folder-album-creator, but had the same issue with Davidacampos' create-immich-albums-from-external-library-folders.js. There is an active discussion going on here. Did some extensive testing and found out that the problem (both in the album and in the timeline!) only occurs when creating albums by one of these scripts. It does not occur when creating albums manually.