Skip to content

Texture rendering not real aspect ratio when i play 960x540 videos #58138

@wangp8895

Description

@wangp8895

I use https://github.com/flutter/plugins/tree/master/packages/video_player/video_player/example to test my mp4 (960x540).
video link:
Widgets code:

          Container(
            padding: const EdgeInsets.all(20),
            child: AspectRatio(
              aspectRatio: _controller.value.aspectRatio,
              child: Stack(
                alignment: Alignment.bottomCenter,
                children: <Widget>[
                  VideoPlayer(_controller),
                  _PlayPauseOverlay(controller: _controller),
//                  VideoProgressIndicator(_controller, allowScrubbing: true),
                ],
              ),
            ),
          ),

result:
device-2020-05-28-103340

The width is larger than parent widget.

THS

[✓] Flutter (Channel stable, v1.17.1, on Mac OS X 10.15.4 19E287, locale
    zh-Hans-CN)
    • Flutter version 1.17.1 at /Users/lushijie/developer/flutter
    • Framework revision f7a6a7906b (2 weeks ago), 2020-05-12 18:39:00 -0700
    • Engine revision 6bc433c6b6
    • Dart version 2.8.2

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/lushijie/android_sdk/
    • Platform android-29, build-tools 29.0.2
    • ANDROID_SDK_ROOT = /Users/lushijie/android_sdk/
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.5, Build version 11E608c
    • CocoaPods version 1.9.2

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 45.1.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build
      1.8.0_212-release-1586-b4-5784211)

[!] IntelliJ IDEA Ultimate Edition (version 2019.1.1)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.dev/intellij-setup/#installing-the-plugins

[✓] VS Code (version 1.45.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.10.2

[✓] Connected device (1 available)
    • Nexus 6P • 84B5T15A17001747 • android-arm64 • Android 8.1.0 (API 27)


Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work liste: device-specificOnly manifests on certain devicesengineflutter/engine related. See also e: labels.p: video_playerThe Video Player pluginpackageflutter/packages repository. See also p: labels.r: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions