-
Notifications
You must be signed in to change notification settings - Fork 28.5k
[video_player_android] Incorrect orientation when previewing captured videos #154696
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
Comments
This comment was marked as outdated.
This comment was marked as outdated.
Re-checking this on Flutter stable The current plugin versions: |
This comment has been minimized.
This comment has been minimized.
I was able to reproduce this on a Pixel. I'm confused because the preview and video rotation is correct but not the thumbnail widget that uses a |
The |
I just tried using the rotation correction that we use for the camera preview on the video player and it does not work.
This could be what's happening. If so, we'll need to ensure that no rotation correction is applied in this case. |
In my case, only videos captured by camera has this issue. Videos from screen recording is ok. Samsung Galaxy S22 Ultra |
I am having same issue, I looked into my recorded video metadata and the rotation seems to be correct. |
I just tested the cc @matanlurey in case you have any thoughts |
Would downgrading to 2.7.1 fix the bug? |
Also running into this on Android API 30, flutter version 3.24.3. Overriding
|
This comment has been minimized.
This comment has been minimized.
I was able to fix the error by adding this dependency in my pubspec.yaml in dev_dependencies: I'm using video_player: ^2.9.2 If I don't put what version the latest default version is used video_player_android: 2.7.13 and this is causing me error |
Made an attempt at fixing this issue in version 2.7.16. Please let me know if this does not fix your issue and a reproduction if possible! Specify |
@camsim99 Thanks to you, It worked!!! when will video_player update the package version? since it is using video_player_android ^2.3.5 |
Over here, Androidscreen-20241029-091647.1.mp4iOS - works as expectedRPReplay_Final1730204678.movCan anyone else see what I'm seeing? |
@AndreHaueisen I think this may be an issue with the plugins assuming a recording in portrait up; I'm seeing the same thing in the camera plugin and trying to fix it right now. Will take a look at this of course, but if anyone else sees this still let me know with any helpful reproduction info! |
Used video_player_android: 2.7.16 in dev_dependencies. The landscape recorded videos are working fine but potrait videos are shrunken and not taking the right resolution. Reproducible on Samsung S23 ultra (Android 14) |
@akshayOnform thanks for letting me know! I suspect this is an issue with not applying this correction in cases where we need to since it looks stretched. Also because my PR did not modify anything about the ExoPlayer itself. I plan to look into it but open to other folks investigating in the meantime of course :) |
I'm experience the same issue as reported by @AndreHaueisen on the latest version of the package (on a Pixel 1). I upgraded my Android Studio to Ladybug and can no longer downgrade to |
Is it possible if we can manually release |
On the other hand, you can still use |
I also met this problem and maybe the reason is below: |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This may not work for many people as that version still uses the deprecated v1 embeddings. I've tested Based on the issue I filed here, which I still find to be valid: #156343 Portrait videos are recorded in landscape with a flag set to tell the player to rotate the video, and impeller has seemed to have an issue with this ever since it was introduced. I'm of the opinion that videos should be recorded in the proper orientation to begin with (without a |
Thanks @jt274 usage of v2.6.0 in dependency_overrides definitely worked for us until there's a proper fix. I do see warnings appear, but for now will assume the next version bump in video_player will likely resolve it.
|
This issue is assigned to @camsim99 but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks! |
Wanted to report that after overriding with v2.6.0 while testing our application we started to experience fatal errors that we were not experiencing before the override related to surface leaks and memory issues. The changelog for |
This comment has been minimized.
This comment has been minimized.
This issue is assigned to @camsim99 but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks! |
i am also facing same problem....if you want temporary solution, You can use this easy_video_editor package to get video aspect ratio and use it with Aspect ratio widget |
Facing the same problem, but it only happens to Pixel Fold. I also tried to set video_player_android to 2.6.0 and 2.4.2, none helped. |
Please let us know if you still see this issue in version 2.8.3. I've been wondering if #157198 impacts this issue, which that version fixes. |
Workaround
Pin
video_player_android
to 2.7.1.Steps to reproduce
With the official example
camera
With other Flutter packages
Run the example of
package:wechat_camera_picker
.Expected results
The video preview should have a correct rotation.
Actual results
The video preview shows an incorrect rotation. This is likely affected by flutter/packages#6456, and we also have similar problems with
camera_android_camerax
: #149177, andcamera_android
: #150549.Code sample
https://github.com/flutter/packages/tree/main/packages/camera/camera/example
Screenshots or Video
Screenshots / Video demonstration
petal_20240906_092951.mp4
Logs
N/A
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: