Skip to content

[video_player] Videos are stretched when the video being played doesn't have a 1.0 Pixel Aspect Ratio (PAR) #132934

Closed
flutter/packages
#12360

Description

@shirlay-Chang

Is there an existing issue for this?

Steps to reproduce

  1. use video_player load a video witch PAR is not 1.0;
  2. use videoController.value.aspectRatio,to set the videoPlayer parent widget aspectRatio ,
  3. finally,the video in screen was stretched.

Expected results

there is no way to get real DAR(PAR x SAR = DAR),to make the video display normally.

Actual results

the video in screen was stretched.

Code sample

VideoPlayer widget like this:
AspectRatio(
          aspectRatio: _videoController.value.aspectRatio,
          child: VideoPlayer(_videoController),
        )

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.10.5, on macOS 11.6.1 20G224 darwin-x64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] VS Code (version 1.81.1)
[✓] Connected device (3 available)
[✓] Network resources

• No issues found!

Activity

  1. dam-ease commented on Aug 21, 2023

    @dam-ease

    Hi @shirlay-Chang. Thanks for filing this. Please can you provide more information on this issue, more specifically:

    Thank you!

  2. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Aug 21, 2023
  3. shirlay-Chang commented on Aug 28, 2023

    @shirlay-Chang
    Author

    this is the video which PAR(pixel aspect ratio) is not 1.0:

    test.mp4

    you can use ffmpeg to get this video's detail info as shown below. what I want to get is the real display aspect ratio to set my video in flutter page. in this case, the value is 9:16. but I can only use 【videoController.value.aspectRatio】to get 1.0.
    截屏2023-08-28 17 38 16

    my UI code is:

    AspectRatio( aspectRatio: _videoController.value.aspectRatio, child: VideoPlayer(_videoController), )

  4. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Aug 28, 2023
  5. dam-ease commented on Aug 28, 2023

    @dam-ease

    Hi @shirlay-Chang. Thanks for your response. I'm unable to reproduce the stretch on the latest flutter versions, is there any reproduction steps I might be missing out on or can you share the actual behaviour on your end vs the expected? Also, I'm not sure I fully understand this issue, can you edit the minimal complete reproducible code sample I added below to reproduce your issue?

    Code Sample Used

    import 'package:flutter/material.dart';
    import 'package:video_player/video_player.dart';
    
    void main() {
      runApp(const App());
    }
    
    class App extends StatelessWidget {
      const App({super.key});
    
      @override
      Widget build(BuildContext context) {
        return const MaterialApp(
          title: 'Demo',
          debugShowCheckedModeBanner: false,
          home: HomePage(),
        );
      }
    }
    
    class HomePage extends StatefulWidget {
      const HomePage({super.key});
    
      @override
      State<HomePage> createState() => _HomePageState();
    }
    
    class _HomePageState extends State<HomePage> {
      late VideoPlayerController _videoController;
    
      @override
      void initState() {
        super.initState();
        _videoController =
            VideoPlayerController.asset('assets/images/test_video.mp4');
    
        _videoController.addListener(() {
          setState(() {});
        });
        _videoController.setLooping(true);
        _videoController.initialize().then((_) => setState(() {}));
        _videoController.play();
      }
    
      @override
      void dispose() {
        _videoController.dispose();
        super.dispose();
      }
    
      @override
      Widget build(BuildContext context) {
        return Scaffold(
          body: SingleChildScrollView(
            child: SafeArea(
              child: Padding(
                padding: const EdgeInsets.all(24),
                child: Column(
                    crossAxisAlignment: CrossAxisAlignment.stretch,
                    children: [
                      AspectRatio(
                        aspectRatio: _videoController.value.aspectRatio,
                        child: VideoPlayer(_videoController),
                      )
                    ]),
              ),
            ),
          ),
        );
      }
    }
    

    stable, master flutter doctor -v

    [✓] Flutter (Channel stable, 3.13.1, on macOS 13.0 22A380 darwin-arm64, locale
        en-NG)
        • Flutter version 3.13.1 on channel stable at
          /Users/damilolaalimi/sdks/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision e1e47221e8 (5 days ago), 2023-08-22 21:43:18 -0700
        • Engine revision b20183e040
        • Dart version 3.1.0
        • DevTools version 2.25.0
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
        • Android SDK at /Users/damilolaalimi/Library/Android/sdk
        • Platform android-34, build-tools 34.0.0
        • ANDROID_HOME = /Users/damilolaalimi/Library/Android/sdk
        • Java binary at: /Applications/Android
          Studio.app/Contents/jbr/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build
          17.0.6+0-17.0.6b802.4-9586694)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 14E300c
        • CocoaPods version 1.12.1
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2022.2)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build
          17.0.6+0-17.0.6b802.4-9586694)
    
    [✓] VS Code (version 1.81.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.50.0
    
    [✓] Connected device (4 available)
        • sdk gphone64 arm64 (mobile) • emulator-5554                        •
          android-arm64  • Android 14 (API 34) (emulator)
        • iPhone 14 (mobile)          • 1A122DE2-0CAB-4C3E-A395-691BF27D626F • ios
          • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
        • macOS (desktop)             • macos                                •
          darwin-arm64   • macOS 13.0 22A380 darwin-arm64
        • Chrome (web)                • chrome                               •
          web-javascript • Google Chrome 116.0.5845.110
    
    [✓] Network resources
        • All expected network resources are available.
    
    • No issues found!
    
     [✓] Flutter (Channel master, 3.14.0-9.0.pre.117, on macOS 13.0 22A380 darwin-arm64, locale en-NG)
        • Flutter version 3.14.0-9.0.pre.117 on channel master at /Users/damilolaalimi/fvm/versions/master
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 2e075d000b (6 hours ago), 2023-08-28 02:12:15 -0400
        • Engine revision 78c26aeff3
        • Dart version 3.2.0 (build 3.2.0-97.0.dev)
        • DevTools version 2.26.2
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
        • Android SDK at /Users/damilolaalimi/Library/Android/sdk
        • Platform android-34, build-tools 34.0.0
        • ANDROID_HOME = /Users/damilolaalimi/Library/Android/sdk
        • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • Build 14E300c
        • CocoaPods version 1.12.1
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2022.2)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    
    [✓] VS Code (version 1.81.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.50.0
    
    [✓] Connected device (4 available)
        • sdk gphone64 arm64 (mobile) • emulator-5554                        • android-arm64  • Android 14 (API 34) (emulator)
        • iPhone 14 (mobile)          • 1A122DE2-0CAB-4C3E-A395-691BF27D626F • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
        • macOS (desktop)             • macos                                • darwin-arm64   • macOS 13.0 22A380 darwin-arm64
        • Chrome (web)                • chrome                               • web-javascript • Google Chrome 116.0.5845.110
    
    [✓] Network resources
        • All expected network resources are available.
    
    • No issues found!
    

  6. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Aug 28, 2023
  7. shirlay-Chang commented on Aug 29, 2023

    @shirlay-Chang
    Author

    Hi, I noticed your device is iphone? my device is android. I use your code sample and same video that I upload, my page just like this,
    flutter app page

    this is my flutter doctor info:
    截屏2023-08-29 10 14 16

    my video_player version is 2.7.0, I check the video_player source code, the aspectRatio is calculated by width and height, when video PAR is not 1.0, there will be a stretch.
    截屏2023-08-29 10 12 19

  8. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Aug 29, 2023
  9. changed the title [-]use video_player load a video witch PAR is not 1.0,cannot get the real DAR[/-] [+][video_player] Videos are stretched when the video being played doesn't have a 1.0 Pixel Aspect Ratio (PAR)[/+] on Aug 29, 2023
  10. danagbemava-nc commented on Aug 29, 2023

    @danagbemava-nc
    Member

    I can reproduce the issue using the code sample in #132934 (comment). I modified it to use the GitHub URL of the video in question. Updated sample below. So far it seems like it is an android only issue. The video is not stretched on either iOS or web.

    Maybe related? #94234

    Labeling for further investigation.

    updated sample
    import 'package:flutter/material.dart';
    import 'package:video_player/video_player.dart';
    
    void main() {
      runApp(const App());
    }
    
    class App extends StatelessWidget {
      const App({super.key});
    
      @override
      Widget build(BuildContext context) {
        return const MaterialApp(
          title: 'Demo',
          debugShowCheckedModeBanner: false,
          home: HomePage(),
        );
      }
    }
    
    class HomePage extends StatefulWidget {
      const HomePage({super.key});
    
      @override
      State<HomePage> createState() => _HomePageState();
    }
    
    class _HomePageState extends State<HomePage> {
      late VideoPlayerController _videoController;
    
      @override
      void initState() {
        super.initState();
        _videoController = VideoPlayerController.networkUrl(Uri.parse('https://github.com/flutter/flutter/assets/11597328/50aa426f-5db4-4164-bf2b-f41e488bb675'));
    
        _videoController.addListener(() {
          setState(() {});
        });
        _videoController.setLooping(true);
        _videoController.initialize().then((_) => setState(() {}));
        _videoController.play();
      }
    
      @override
      void dispose() {
        _videoController.dispose();
        super.dispose();
      }
    
      @override
      Widget build(BuildContext context) {
        return Scaffold(
          body: SingleChildScrollView(
            child: SafeArea(
              child: Padding(
                padding: const EdgeInsets.all(24),
                child: Column(
                  crossAxisAlignment: CrossAxisAlignment.stretch,
                  children: [
                    AspectRatio(
                      aspectRatio: _videoController.value.aspectRatio,
                      child: VideoPlayer(_videoController),
                    )
                  ],
                ),
              ),
            ),
          ),
        );
      }
    }
    flutter doctor -v
    [✓] Flutter (Channel stable, 3.13.1, on macOS 13.4.1 22F770820d darwin-arm64, locale en-GB)
        • Flutter version 3.13.1 on channel stable at /Users/nexus/dev/sdks/flutter
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision e1e47221e8 (6 days ago), 2023-08-22 21:43:18 -0700
        • Engine revision b20183e040
        • Dart version 3.1.0
        • DevTools version 2.25.0
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
        • Android SDK at /Users/nexus/Library/Android/sdk
        • Platform android-33, build-tools 33.0.1
        • Java binary at: /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/223.8836.35.2231.10406996/Android Studio.app/Contents/jbr/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 14.3)
        • Xcode at /Applications/Xcode-14.3.0.app/Contents/Developer
        • Build 14E222b
        • CocoaPods version 1.12.1
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2022.2)
        • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.10121639/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    
    [✓] Android Studio (version 2022.3)
        • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/223.8836.35.2231.10406996/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    
    [✓] IntelliJ IDEA Ultimate Edition (version 2023.2)
        • IntelliJ at /Users/nexus/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
        • Flutter plugin version 75.1.4
        • Dart plugin version 232.8660.129
    
    [✓] IntelliJ IDEA Ultimate Edition (version 2023.1.4)
        • IntelliJ at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9225.16/IntelliJ IDEA.app
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
    
    [✓] IntelliJ IDEA Ultimate Edition (version 2023.2)
        • IntelliJ at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/232.8660.185/IntelliJ IDEA.app
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
    
    [✓] VS Code (version 1.81.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.70.0
    
    [✓] Connected device (4 available)
        • Pixel 7 (mobile) • 28291FDH2001SA            • android-arm64  • Android 13 (API 33)
        • Nexus (mobile)   • 00008020-001875E83A38002E • ios            • iOS 16.6 20G75
        • macOS (desktop)  • macos                     • darwin-arm64   • macOS 13.4.1 22F770820d darwin-arm64
        • Chrome (web)     • chrome                    • web-javascript • Google Chrome 116.0.5845.110
    
    [✓] Network resources
        • All expected network resources are available.
    
    • No issues found!
    
    [!] Flutter (Channel master, 3.14.0-12.0.pre.78, on macOS 13.4.1 22F770820d darwin-arm64, locale en-GB)
        • Flutter version 3.14.0-12.0.pre.78 on channel master at /Users/nexus/dev/sdks/flutters
        ! Warning: `flutter` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
        ! Warning: `dart` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
        • Upstream repository https://github.com/flutter/flutter.git
        • Framework revision 6dae269881 (3 hours ago), 2023-08-29 00:22:24 -0400
        • Engine revision c7c61ff973
        • Dart version 3.2.0 (build 3.2.0-118.0.dev)
        • DevTools version 2.26.2
        • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
        • Android SDK at /Users/nexus/Library/Android/sdk
        • Platform android-33, build-tools 33.0.1
        • Java binary at: /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/223.8836.35.2231.10406996/Android Studio.app/Contents/jbr/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 14.3)
        • Xcode at /Applications/Xcode-14.3.0.app/Contents/Developer
        • Build 14E222b
        • CocoaPods version 1.12.1
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2022.2)
        • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.10121639/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    
    [✓] Android Studio (version 2022.3)
        • Android Studio at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/223.8836.35.2231.10406996/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    
    [✓] IntelliJ IDEA Ultimate Edition (version 2023.1.4)
        • IntelliJ at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9225.16/IntelliJ IDEA.app
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
    
    [✓] IntelliJ IDEA Ultimate Edition (version 2023.2)
        • IntelliJ at /Users/nexus/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/232.8660.185/IntelliJ IDEA.app
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
    
    [✓] VS Code (version 1.81.1)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.70.0
    
    [✓] Connected device (4 available)
        • Pixel 7 (mobile) • 28291FDH2001SA            • android-arm64  • Android 13 (API 33)
        • Nexus (mobile)   • 00008020-001875E83A38002E • ios            • iOS 16.6 20G75
        • macOS (desktop)  • macos                     • darwin-arm64   • macOS 13.4.1 22F770820d darwin-arm64
        • Chrome (web)     • chrome                    • web-javascript • Google Chrome 116.0.5845.110
    
    [✓] Network resources
        • All expected network resources are available.
    
    ! Doctor found issues in 1 category.
    
    
  11. added
    packageflutter/packages repository. See also p: labels.
    has reproducible stepsThe issue has been confirmed reproducible and is ready to work on
    and removed
    in triagePresently being triaged by the triage team
    on Aug 29, 2023
  12. 6 remaining items

  13. titobrezende commented on May 31, 2024

    @titobrezende
  14. JiyadAhammad commented on Oct 21, 2024

    @JiyadAhammad

    With Android, I have the same problem. I'm using the most recent version of the video player, and several of the videos—mostly those that were taken from a wide angle (0.6) are playing stretched. However, the same video with the same pixel ratio working in iOS.

  15. Laestry commented on Dec 1, 2024

    @Laestry

    What I've noticed if that the height and width come in as the same value, so for now I'm just aplying the "correct" aspectratio on my videos as most of have an aspect ratio of 9/16. Defo not the best solution but works for now.
    If you are storing your vids in your own backend the best solution for now would be to probably keep the correct aspect ratio on your backend or get it using another library.

          double videoWidth = _controller!.value.size.width;
          double videoHeight = _controller!.value.size.height;
          double adjustedAspectRatio;
    
          double videoAspectRatio = videoWidth / videoHeight;
    
          if (videoWidth == videoHeight) {
            adjustedAspectRatio = 9 / 16;
            videoHeight /= 0.5625;
          } else {
            adjustedAspectRatio = videoAspectRatio;
          }
          
    
  16. juliamwangi123 commented on Sep 26, 2025

    @juliamwangi123
  17. misobadev commented on Oct 12, 2025

    @misobadev
  18. DevHitesh29 commented on Oct 13, 2025

    @DevHitesh29
  19. github-actions commented on Sep 16, 2026

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

  20. locked as resolved and limited conversation to collaborators on Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listfound in release: 3.13Found to occur in 3.13found in release: 3.14Found to occur in 3.14has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: video_playerThe Video Player pluginpackageflutter/packages repository. See also p: labels.team-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