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

Issue with "cinematic" videos created by android phone #9581

Open
2 of 3 tasks
MelanieTanaka opened this issue May 18, 2024 · 6 comments
Open
2 of 3 tasks

Issue with "cinematic" videos created by android phone #9581

MelanieTanaka opened this issue May 18, 2024 · 6 comments

Comments

@MelanieTanaka
Copy link

The bug

I have issues with videos created by an android phone: Pixel 4, official google camera app shipped with the phone.

video settings: on video mode I select "cinematic pan" under "video stabilization".

My immich mobile app auto-uploads to the server.

Regular videos that do not have this option selected play fine on the web browser immich app.
Videos with "cinematic pan" seem to not upload correctly via the mobile app (on web browser they have a red cicrle with ! in the top right corner in gallery view, clicking the video thumbnail results in infinite loading animation).

If I transfer the video file to my PC via USB cable then drag & drop into the immich web app for manual upload, video playback is fine and this issue does not occur.

The OS that Immich Server is running on

debian 12.5 + docker

Version of Immich Server

v1.103.1

Version of Immich Mobile App

v1.105.0

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

name: immich

services:
  immich-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:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always


  immich-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

  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}-cuda
    extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
       file: hwaccel.ml.yml
       service: cuda # 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:84882e87b54734154586e5f8abd4dce69fe7311315e2fc6d67c29614c8de2672
    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:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    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=/data/photos
# The location where your database files are stored
DB_DATA_LOCATION=/data/photosdb

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

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

Reproduction steps

1. have immich app configured to auto upload to server
2. use android phone to create video with "cinematic pan" selected for video stabilization
3. allow video to upload
4. attempt to view video in web browser version of immich
5. create a "normal" video and some photos, allow them to upload to make sure everything else is fine

Relevant log output

Only 2 lines of logs generate when the video is uploaded (docker compose logs -f):


immich_microservices     | [Nest] 7  - 05/18/2024, 2:12:12 PM     LOG [MediaService] Successfully generated JPEG video preview for asset b03b1111-3b19-4956-bd43-bf151d06186a
immich_microservices     | [Nest] 7  - 05/18/2024, 2:12:12 PM     LOG [MediaService] Successfully generated WEBP video thumbnail for asset b03b1111-3b19-4956-bd43-bf151d06186a


When hovering over the video thumbnail with mouse cursor:

immich_server            | [Nest] 7  - 05/18/2024, 2:14:00 PM    WARN [ExpressAdapter] Content-Type doesn't match Reply body, you might need a custom ExceptionFilter for non-JSON responses

Additional information

No response

@alextran1502
Copy link
Contributor

Can you help attach a sample video to this issue so we can reproduce?

@MelanieTanaka
Copy link
Author

Here's one, I had to edit out the gps metadata so hopefully that doesn't impact testing. zipped in case github does any processing to it.

PXL_20240518_164445273.CINEMATIC.mp4.zip

@justin13888
Copy link

@MelanieTanaka I attempted to replicate your issue with the latest immich server and app. I'm able to upload that video and then view from my mobile devices. But I does take 10-20 seconds for the video to play again on another device (which I think is a performance issue for some video codecs in general). Also I'm having trouble playing the video on the web app instead.

image

@MelanieTanaka
Copy link
Author

@justin13888 in the web view of photos timeline (/photos) does the video show a red exclamation in a circle in the top right?

Your web view behavior is identical to mine except that instead of the error message mine is just an infinite loading (spinning circle).

I don't have a second mobile device to be able to test playback there.

Every time I hover over the thumbnail for the video in web view I get the error message shown in my docker logs in my original post above, if you're running from docker is it the same for you as well?

@justin13888
Copy link

@justin13888 in the web view of photos timeline (/photos) does the video show a red exclamation in a circle in the top right?

Your web view behavior is identical to mine except that instead of the error message mine is just an infinite loading (spinning circle).

I don't have a second mobile device to be able to test playback there.

Every time I hover over the thumbnail for the video in web view I get the error message shown in my docker logs in my original post above, if you're running from docker is it the same for you as well?

Just to make sure it's not a glitch, have you tried deleting and uploading back to immich cinematic videos to verify it's replicatable at least on your setup? I'm using Docker and the latest v1.105.x builds.

About the error message in my screenshot earlier, there are a few other types of photos which also is unviewable for me. I'll have to find a chance later to isolate those formats.

@MelanieTanaka
Copy link
Author

Yes I've uploaded manually the same video multiple times as well as created new ones and allow them to upload automatically from the mobile app.

Also upgraded to v1.105.1 yesterday and redid tests, identical behavior to my original post.

I noticed the ones from google takeout service that I downloaded to then import to immich by command line with "immich-go" do not have this problem. It seems google photos has done some processing to the file when storing it on their servers that eliminated the incompatibility of the format/codec or something.

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

3 participants