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

[BUG] Unable to play motion photos from One UI 6 (Android 14) #4873

Closed
3 tasks done
thok0831 opened this issue Nov 6, 2023 · 4 comments · Fixed by #6337
Closed
3 tasks done

[BUG] Unable to play motion photos from One UI 6 (Android 14) #4873

thok0831 opened this issue Nov 6, 2023 · 4 comments · Fixed by #6337
Labels
bug Something isn't working needs triage Bug that needs triage from maintainer

Comments

@thok0831
Copy link

thok0831 commented Nov 6, 2023

The bug

Immich is unable to play motion photos captured from One UI 6 (Samsung's Android 14) while all other apps can play it just fine.
I'm not sure if this applies to all Android 14 devices or if it is Samsung specific.

While I am unsure of the exact cause, the following characteristics were noticed for all photos taken with that particular OS version in common:

One UI 5 (Android 13) has
Directory item length : 0
Directory item padding : 59

One UI 6 (Android 14) has
Directory item length : varies from file to file
Directory item padding : 111

I added one sample picture from each version.
https://drive.google.com/drive/folders/1as4MVNJsLQWUTeVFcv8AusSukWHEFaDb?usp=sharing

Support thread from discord:
https://discord.com/channels/979116623879368755/1170085304414240848

The OS that Immich Server is running on

Synology Docker Compose

Version of Immich Server

v1.84

Version of Immich Mobile App

v1.84

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

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
      - /volume1/homes/user/Photos:/data/Photos:ro
    env_file:
      - .env
    depends_on:
      - redis
      - database
      - typesense
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.yml
    #   service: hwaccel
    command: ["start.sh", "microservices"]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - /volume1/homes/user/Photos:/data/Photos:ro
    env_file:
      - .env
    depends_on:
      - redis
      - database
      - typesense
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  immich-web:
    container_name: immich_web
    image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release}
    env_file:
      - .env
    restart: always

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
      # remove this to get debug messages
      - GLOG_minloglevel=1
    volumes:
      - tsdata:/data
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
    restart: always

  database:
    container_name: immich_postgres
    image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

  immich-proxy:
    container_name: immich_proxy
    image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release}
    ports:
      - 2283:8080
    depends_on:
      - immich-server
      - immich-web
    restart: always

volumes:
  pgdata:
  model-cache:
  tsdata:

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 Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secrets for postgres and typesense. You should change these to random passwords
TYPESENSE_API_KEY=some-random-text
DB_PASSWORD=postgres

# 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. Take a picture with One UI 6 device
2. Upload it to Immich, doesn't matter web or mobile
3. While the image itself loads, attempting to play motion photo will result in infinite looping of video, and trying to hover the cursor on the motion photo icon on the timeline will show an error mark.

Additional information

No response

@thok0831 thok0831 added bug Something isn't working needs triage Bug that needs triage from maintainer labels Nov 6, 2023
@mjsamberg
Copy link

I have experienced this issue as well. Additionally, when I download the files from Immich, the video files from One UI 5 will play on Windows just fine. However, the ones from One UI 6 won't upload. Not sure if that means the file format has changed or that there's a corruption that is occurring upon upload to Immich.

@kaysond
Copy link
Contributor

kaysond commented Jan 9, 2024

+1. ffprobe-ing the mp4 that is downloaded from immich gives an error:

ffprobe version 6.1-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2023 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x8618fc0] Format mov,mp4,m4a,3gp,3g2,mj2 detected only with low score of 1, misdetection possible!
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x8618fc0] moov atom not found
/home/aram/20240102_133439.mp4: Invalid data found when processing input

If I export the video from the Samsung Gallery app, the video comes out fine:

ffprobe version 6.1-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2023 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/aram/20240106_184359-1.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2024-01-07T02:44:01.000000Z
    com.android.version: 14
  Duration: 00:00:03.07, start: 0.000000, bitrate: 15026 kb/s
  Stream #0:0[0x1](eng): Video: h264 (High) (avc1 / 0x31637661), yuvj420p(pc, bt470bg/bt470bg/smpte170m, progressive), 1440x1080, 14776 kb/s, 24.42 fps, 120 tbr, 90k tbn (default)
    Metadata:
      creation_time   : 2024-01-07T02:44:01.000000Z
      handler_name    : VideoHandle
      vendor_id       : [0][0][0][0]
    Side data:
      displaymatrix: rotation of -90.00 degrees
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 256 kb/s (default)
    Metadata:
      creation_time   : 2024-01-07T02:44:01.000000Z
      handler_name    : SoundHandle
      vendor_id       : [0][0][0][0]

Not sure if the issue is on the Android app side, meaning it's not grabbing the mp4 correctly, or the immich server side, meaning it's corrupting the file. Happy to help debug if someone can suggest how to tell.

@kaysond
Copy link
Contributor

kaysond commented Jan 12, 2024

@thok0831 is it ok if we use your test images in https://github.com/immich-app/test-assets for unit testing?

@thok0831
Copy link
Author

@thok0831 is it ok if we use your test images in https://github.com/immich-app/test-assets for unit testing?

Sorry for the late reply.
Of course, I just updated the Google Drive folder with the pictures without geolocation just to make sure, so feel free to utilize it.

Thank you for making the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Bug that needs triage from maintainer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants