immich
immich copied to clipboard
[BUG] Exif metadata 'Rotation: 180' ignored for videos on mobile app
The bug
Videos recorded in horizontal by turning the phone 90 degrees clockwise (how a left-handed would typically record the video with one hand) are reproduced upside down in the mobile app.
At least with my phone, the raw data of the videos is the same no matter the orientation of recording, except for the exif metadata Rotation
, that would be 0
, 90
or 180
depending on the case.
Videos with 0
, 90
(even 270
) values are reproduced correctly, only 180
is buggy.
The thumbnail (web browser and mobile app), reproduction in the web browser and preview in the web browser are all displayed correctly for all videos.
The OS that Immich Server is running on
Host is Debian amd64 (container images ghcr.io/immich-app/*)
Version of Immich Server
v1.52.1
Version of Immich Mobile App
v1.52.0
Platform with the issue
- [ ] Server
- [ ] Web
- [X] Mobile
Your docker-compose.yml content
https://github.com/immich-app/immich/releases/download/v1.52.1/docker-compose.yml
Your .env content
https://github.com/immich-app/immich/releases/download/v1.52.1/example.env
Reproduction steps
- Prepare videos with different rotations. For example, download test video and set Rotation values with exiftool:
$ wget -O 0.mp4 https://freetestdata.com/wp-content/uploads/2022/02/Free_Test_Data_1MB_MP4.mp4
$ cp 0.mp4 90.mp4
$ cp 0.mp4 180.mp4
$ cp 0.mp4 270.mp4
$ exiftool -Rotation=90 90.mp4
$ exiftool -Rotation=180 180.mp4
$ exiftool -Rotation=270 270.mp4
$ exiftool -Rotation *.mp4
======== 0.mp4
Rotation : 0
======== 180.mp4
Rotation : 180
======== 270.mp4
Rotation : 270
======== 90.mp4
Rotation : 90
4 image files read
- Play the videos in the mobile app (Android), after uploading them to the server or before backing-up, makes no difference.
Additional information
No response
@jrasm91 I think this is more of a https://github.com/immich-app/immich/labels/%F0%9F%93%B1mobile related issue.
Actually, it seems to be derived from flutter and the video_player
package: https://github.com/flutter/flutter/issues/122276. Is pinning video_player
to version 2.3.4
an option? At least until https://github.com/flutter/flutter/issues/122276 is resolved.
Possibly resolved by #2908? Might need some adjustment to the transcoder too.
Noticed that problem too, seems like player problem. Immich Web and other web/mobile players play such videos correctly.
I also have this problem on the Android mobile app. Rotation 0 and 90 play correctly but 180 is upside down. When viewing on a web browser it plays correctly.
Issue still exists on latest version. @uhthomas yes, it's specific to android app. Videos are rotated upside down only on mobile app, look normal on web page. I'm left handed and all my videos recorded using phone are upside down in Immich android app.
Since it seems dead at the Flutter's end; can it be fixed at the Immich side of things?
Same here - it's wrong only in the Android mobile app; iOS is fine, so is the web version.
I experience the same bug on a Pixel 7. The web version displays the video in the correct rotation.
I'm also having this issue on a Samsung S22+ with the android immich client app
Same here, S20FE.
I'm having this issue as well on the Fold 4.
Can confirm this on 1.111.0 with MiMix 2s with lineage 21 (android 14) onboard.