Skip to content

MP4 container incorrectly identified as MOV #20778

@dahool

Description

@dahool

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

As discussed in discord, MP4 container is incorrectly identified as MOV and is always transcoding when it shouldn't

The OS that Immich Server is running on

Ubuntu Server LTS

Version of Immich Server

v1.137.3

Version of Immich Mobile App

v1.137.2

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

N/A

Your .env content

N/A

Reproduction steps

  1. Configure transcoding as shown in the image
  2. Upload sample file (file is HVEC MP4, as per the settings it shouldn't be transcoded)

Relevant log output

[Nest] 7  - 08/07/2025, 8:57:55 PM     LOG [Microservices:MediaService] Transcoding video 1fbe9bdb-2d59-444a-8e2b-fe1940245c03 with QSV-accelerated encoding and decoding
[Nest] 18  - 08/07/2025, 8:57:55 PM   DEBUG [Api:LoggingInterceptor~tek3grjb] GET /api/assets/1fbe9bdb-2d59-444a-8e2b-fe1940245c03/thumbnail?size=thumbnail&c=J%2FgJBACA6GYXeIR5d0h%2FU%2FUHRQ%3D%3D 200 7.54ms 192.168.1.102
[Nest] 7  - 08/07/2025, 8:57:55 PM   DEBUG [Microservices:MediaRepository] ffmpeg -n 10 /usr/bin/ffmpeg -hwaccel qsv -hwaccel_output_format qsv -async_depth 4 -noautorotate -qsv_device /dev/dri/renderD128 -threads 1 -i /usr/src/app/upload/library/admin/2025_08/VID_20250807_201502515.mp4 -y -c:v copy -c:a copy -movflags faststart -fps_mode passthrough -map 0:0 -map_metadata -1 -bf 7 -refs 5 -g 256 -tag:v hvc1 -v verbose -preset 2 -threads 2 -global_quality:v 28 -maxrate 2600k -bufsize 5200k /usr/src/app/upload/encoded-video/5078b6b7-fc45-49b1-a63c-2fc7fcd08f4b/1f/be/1fbe9bdb-2d59-444a-8e2b-fe1940245c03.mp4
[Nest] 7  - 08/07/2025, 8:57:55 PM   DEBUG [Microservices:MediaRepository] Transcoding 100.00% done for output 1fbe9bdb-2d59-444a-8e2b-fe1940245c03.mp4
[Nest] 7  - 08/07/2025, 8:57:55 PM     LOG [Microservices:MediaService] Successfully encoded 1fbe9bdb-2d59-444a-8e2b-fe1940245c03

Additional information

Settings
Image

Sample File
https://github.com/user-attachments/assets/fa3e076e-d89f-4615-9896-8561d02103a3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions