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] Exif metadata 'Rotation: 180' ignored for videos on mobile app #2130

Closed
1 of 3 tasks
andresbono opened this issue Mar 30, 2023 · 16 comments · Fixed by #12104
Closed
1 of 3 tasks

[BUG] Exif metadata 'Rotation: 180' ignored for videos on mobile app #2130

andresbono opened this issue Mar 30, 2023 · 16 comments · Fixed by #12104

Comments

@andresbono
Copy link

andresbono commented Mar 30, 2023

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

  1. 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
  1. 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

@andresbono
Copy link
Author

@jrasm91 I think this is more of a 📱mobile related issue.

Actually, it seems to be derived from flutter and the video_player package: flutter/flutter#122276. Is pinning video_player to version 2.3.4 an option? At least until flutter/flutter#122276 is resolved.

@uhthomas
Copy link
Member

uhthomas commented Jul 9, 2023

Possibly resolved by #2908? Might need some adjustment to the transcoder too.

@waclaw66
Copy link
Contributor

Noticed that problem too, seems like player problem. Immich Web and other web/mobile players play such videos correctly.

@nguypaul
Copy link

nguypaul commented Aug 1, 2023

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.

@kkmaslowski
Copy link

kkmaslowski commented Feb 4, 2024

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.

@sbkg0002
Copy link

Since it seems dead at the Flutter's end; can it be fixed at the Immich side of things?

@dgtal1
Copy link

dgtal1 commented May 13, 2024

Same here - it's wrong only in the Android mobile app; iOS is fine, so is the web version.

@Tywele
Copy link

Tywele commented May 18, 2024

I experience the same bug on a Pixel 7. The web version displays the video in the correct rotation.

@m-GDEV
Copy link

m-GDEV commented Jun 23, 2024

I'm also having this issue on a Samsung S22+ with the android immich client app

@ec0li82
Copy link

ec0li82 commented Jun 24, 2024

Same here, S20FE.

@WizenThorne
Copy link

I'm having this issue as well on the Fold 4.

@illmouse
Copy link

illmouse commented Aug 3, 2024

Can confirm this on 1.111.0 with MiMix 2s with lineage 21 (android 14) onboard.

@AtmosphericIgnition
Copy link
Contributor

Same here on a Pixel 8 Pro with GrapheneOS, running Immich 1.113.0

@jrasm91
Copy link
Contributor

jrasm91 commented Sep 4, 2024

Can someone upload a zip of a file with this issue?

@jrasm91
Copy link
Contributor

jrasm91 commented Sep 4, 2024

Ah nevermind, I see this is reproducible with exiftool commands. Will try to reproduce.

@andresbono
Copy link
Author

andresbono commented Nov 14, 2024

I tried Immich on Android again after a while and it looks like this issue is gone 🎉 I'm using 1.120.2 build.167.

Can someone else confirm the issue is fixed with the latest version of the Android app?

And just curious, any clue about what was the fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.