immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
43.4k stars 2.12k forks source link

Video imported from Google Photo Takeout slowed down #10582

Closed maximesenger closed 2 months ago

maximesenger commented 2 months ago

The bug

I have exported all of my Google Photo library and imported it in Immich. All videos are slowed down by 400%, for example a 3-minute video is now 12 minutes long.

The OS that Immich Server is running on

Ubuntu server

Version of Immich Server

1.106.4

Version of Immich Mobile App

1.106.3

Platform with the issue

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}
    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}
    # 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
    ports:
      - 3003:3003

  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

volumes:
  pgdata:
  model-cache:

Your .env content

none

Reproduction steps

1. Take video with Pixel 6A
2. Export Video from Google Photo withe Google Takeout
3. Import Video by dragging it on the web page
4. Play video on the web/app or download the video

Relevant log output

No response

Additional information

No response

bo0tzz commented 2 months ago

Are these high framerate/slowmotion videos by chance? Immich doesn't have support for those yet, so they just get played back at ~30fps.

maximesenger commented 2 months ago

They were taken without slowmotion activated, just vanilla camera app settings. My guess was the same as yours, they are probably 120fps by default on the phone and are turned into 30fps.

But this is something that should be taken into account because if a phone from 2 years ago do it, I think most of them do it now. Do you know if this is on the roadmap ?

bo0tzz commented 2 months ago

Most of the time the framerate is properly included in the exif data, which means it gets considered when transcoding to the preview files and so things look OK. I suspect that google photos removed that exif data so the information necessary to process it correctly is missing.