immich
immich copied to clipboard
fix(mobile): handle Live/Motion Photos aspect ratio mismatch
Description
Display the video portion of Live/Motion Photos in their correct aspect ratio on mobile devices.
In previous versions, the program did not account for cases where the video portion and photo portion of Live/Motion Photos had different aspect ratios (#16120), resulting in stretched video display.
You can find the original error recording and test photos in #16120
How Has This Been Tested?
You can reproduce this by uploading a Live/Motion Photo with different aspect ratios between its video and photo portions, and then trying to view the video in the App. The original error and file can be seen in the Issues mentioned above.
I don't have an iOS device, so I'm not certain about its functionality on iOS devices. (In any unexpected situations, such as incorrect video aspect ratio detection, the code will not attempt to modify the original ratio, meaning it will display the video using the static photo's aspect ratio, just like before)
Screenshots
| Before | After |
|---|---|
|
|
|
ScreenRecord
Checklist:
- [x] I have performed a self-review of my own code
- [x] I have made corresponding changes to the documentation if applicable
- [x] I have no unrelated changes in the PR.
- [ ] I have confirmed that any new dependencies are strictly necessary.
- [ ] I have written tests for new code (if applicable)
- [x] I have followed naming conventions/patterns in the surrounding code
- [ ] All code in
src/servicesuses repositories implementations for database calls, filesystem operations, etc. - [ ] All code in
src/repositories/is pretty basic/simple and does not have any immich specific logic (that belongs insrc/services)
Hello, do you have a sample LivePhotos asset that is causing the issue?
Sure, i uploaded it on #16120 Or https://drive.google.com/file/d/1-aVjQIpGB3QwcLMTV8sp4MAIp1JkVIRn/view?usp=sharing
This change causes the issue of wrong aspect ratio on playing a local video on iPhone