Skip to content

[video_player_android] Incorrect orientation when previewing captured videos #154696

Closed

Description

@AlexV525

Workaround

  • Pin video_player_android to 2.7.1.
  • Upgrade to video_player_android to 2.8.4.

Steps to reproduce

With the official example

  1. Run the example of camera
  2. Select a camera and record for a few seconds in portrait up.
  3. See the preview video being orientated incorrectly.

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, and camera_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
[✓] Flutter (Channel master, 3.25.0-1.0.pre.270, on Microsoft Windows [Version 10.0.22631.4037], locale en-US)
    • Flutter version 3.25.0-1.0.pre.270 on channel master at X:\SDK\flutter-master
    • Upstream repository https://github.com/flutter/flutter
    • Framework revision a7cd788d80 (16 hours ago), 2024-09-05 05:57:40 -0400
    • Engine revision 34b61eb53b
    • Dart version 3.6.0 (build 3.6.0-216.0.dev)
    • DevTools version 2.39.0
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[✓] Windows Version (Installed version of Windows is version 10 or higher)

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at X:\Android\SDK
    • Platform android-35, build-tools 35.0.0
    • ANDROID_HOME = X:\Android\SDK
    • ANDROID_SDK_ROOT = X:\Android\SDK
    • Java binary at: X:\IDEs\AndroidStudio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.11+0--11852314)
    • All Android licenses accepted.

Activity

  1. added
    in triagePresently being triaged by the triage team
    on Sep 6, 2024
  2. huycozy commented on Sep 6, 2024

    @huycozy
  3. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Sep 6, 2024
  4. huycozy commented on Sep 6, 2024

    @huycozy
    Member

    Re-checking this on Flutter stable 3.24.2 and master 3.25.0-1.0.pre.283, I can reproduce the issue using camera_android_camerax example.

    The current plugin versions: camera_android_camerax: 0.6.8+3 and video_player_android: ^2.7.3

  5. added
    platform-androidAndroid applications specifically
    packageflutter/packages repository. See also p: labels.
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    team-androidOwned by Android platform team
    fyi-ecosystemFor the attention of Ecosystem team
    and removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    in triagePresently being triaged by the triage team
    on Sep 6, 2024
  6. 43 remaining items

  7. LUK3D commented on Apr 6, 2025

    @LUK3D
  8. added
    ⏳Bot is counting down the days until it unassigns the issue
    and removed
    ⏳Bot is counting down the days until it unassigns the issue
    on Apr 6, 2025
  9. flutter-triage-bot commented on Apr 9, 2025

    @flutter-triage-bot

    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!

  10. 2tick commented on Apr 11, 2025

    @2tick

    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

  11. suesitran commented on Apr 24, 2025

    @suesitran

    Facing the same problem, but it only happens to Pixel Fold.
    Tested on Pixel Fold, Sony Xperia and Samsung Galaxy.

    I also tried to set video_player_android to 2.6.0 and 2.4.2, none helped.

  12. camsim99 commented on May 7, 2025

    @camsim99
    Contributor

    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.

  13. removed
    ⏳Bot is counting down the days until it unassigns the issue
    on May 7, 2025
  14. AlexV525 commented on May 17, 2025

    @AlexV525
    MemberAuthor

    Image

    @camsim99 The orientation is correct, but the aspect ratio is still wrong.

  15. camsim99 commented on May 19, 2025

    @camsim99
    Contributor

    Landing flutter/packages#9199 -- hopefully related to this issue as well.

  16. AlexV525 commented on May 21, 2025

    @AlexV525
    MemberAuthor

    I confirm that flutter/packages#9199 resolves the issue, and it's included in video_player_android 2.8.4. Thanks for the fix!

  17. added
    r: fixedIssue is closed as already fixed in a newer version
    on May 22, 2025
  18. github-actions commented on Jun 5, 2025

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  19. locked as resolved and limited conversation to collaborators on Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listfound in release: 3.24Found to occur in 3.24found in release: 3.25Found to occur in 3.25has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: video_playerThe Video Player pluginpackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions