fluttercommunity / chewie

The video player for Flutter with a heart of gold
MIT License
1.94k stars 1.01k forks source link

Failed to run example on Android #529

Open Ashkan4472 opened 3 years ago

Ashkan4472 commented 3 years ago

Hi i have tried to run github example on Pixel_3a_API_30_x86 but after the build and installation in AVD, the AVD crashed and these errors logged from flutter:

Connecting to VM Service at ws://127.0.0.1:40387/d0g-5oINUrQ=/ws
W/example.exampl( 4494): Accessing hidden method Landroid/media/AudioTrack;->getLatency()I (greylist, reflection, allowed)
I/ExoPlayerImpl( 4494): Init c2a1773 [ExoPlayerLib/2.14.1] [generic_x86_arm, sdk_gphone_x86_arm, Google, 30]
I/ExoPlayerImpl( 4494): Init 82b9b48 [ExoPlayerLib/2.14.1] [generic_x86_arm, sdk_gphone_x86_arm, Google, 30]
I/TetheringManager( 4494): registerTetheringEventCallback:com.example.example
I/VideoCapabilities( 4494): Unsupported profile 4 for video/mp4v-es
2
I/OMXClient( 4494): IOmx service obtained
D/SurfaceUtils( 4494): connecting to surface 0xe66579e8, reason connectToSurface
D/SurfaceUtils( 4494): connecting to surface 0xe6654788, reason connectToSurface
I/MediaCodec( 4494): [OMX.android.goldfish.h264.decoder] setting surface generation to 4601857
D/SurfaceUtils( 4494): disconnecting from surface 0xe66579e8, reason connectToSurface(reconnect)
I/MediaCodec( 4494): [OMX.android.goldfish.h264.decoder] setting surface generation to 4601858
D/SurfaceUtils( 4494): connecting to surface 0xe66579e8, reason connectToSurface(reconnect)
D/SurfaceUtils( 4494): disconnecting from surface 0xe6654788, reason connectToSurface(reconnect)
D/SurfaceUtils( 4494): connecting to surface 0xe6654788, reason connectToSurface(reconnect)
2
E/ACodec  ( 4494): [OMX.android.goldfish.h264.decoder] setPortMode on output to DynamicANWBuffer failed w/ err -1010
2
I/ACodec  ( 4494): codec does not support config priority (err -1010)
D/SurfaceUtils( 4494): disconnecting from surface 0xe6654788, reason setNativeWindowSizeFormatAndUsage
D/SurfaceUtils( 4494): disconnecting from surface 0xe66579e8, reason setNativeWindowSizeFormatAndUsage
D/SurfaceUtils( 4494): connecting to surface 0xe66579e8, reason setNativeWindowSizeFormatAndUsage
D/SurfaceUtils( 4494): set up nativeWindow 0xe66579e8 for 1280x720, color 0x13, rotation 0, usage 0x1002900
D/SurfaceUtils( 4494): connecting to surface 0xe6654788, reason setNativeWindowSizeFormatAndUsage
D/SurfaceUtils( 4494): set up nativeWindow 0xe6654788 for 720x1280, color 0x13, rotation 0, usage 0x1002900
W/Gralloc4( 4494): allocator 3.x is not supported
Error handling 'checkPlatformOverride' custom request: method not available: ext.flutter.platformOverride
Error handling 'checkBrightnessOverride' custom request: method not available: ext.flutter.brightnessOverride
Error handling 'checkIsWidgetCreationTracked' custom request: method not available: ext.flutter.inspector.isWidgetCreationTracked
Error handling 'serviceExtension' custom request: method not available: ext.flutter.inspector.setPubRootDirectories

also here is my flutter doctor -v:

[✓] Flutter (Channel stable, 2.2.3, on Linux, locale en_US.UTF-8)
    • Flutter version 2.2.3 at /opt/flutter
    • Framework revision f4abaa0735 (7 weeks ago), 2021-07-01 12:46:11 -0700
    • Engine revision 241c87ad80
    • Dart version 2.13.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /home/ashkan/Android/Sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /opt/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
    • All Android licenses accepted.

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 2020.3)
    • Android Studio at /opt/android-studio
    • 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 11.0.10+0-b96-7249189)

[✓] Connected device (1 available)
    • sdk gphone x86 arm (mobile) • emulator-5554 • android-x86 • Android 11 (API 30)
      (emulator)

! Doctor found issues in 1 category.
apugoneappu commented 2 years ago

+1, same issue

XuFeng-Li commented 1 year ago

I also encountered the same problem. Has this issue been resolved?

D/MediaCodecInfo(29136): NoSupport [sizeAndRate.support, 1080x2336x32.16374206542969] [c2.android.mpeg4.decoder, video/mp4v-es] [HWNAM, NAM-AL00, HUAWEI, 31]

[✓] Flutter (Channel stable, 2.8.1, on macOS 13.3.1 22E772610a darwin-arm, locale zh-Hans-CN) • Flutter version 2.8.1 at /Users/maple/Documents/SDK/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 77d935af4d (1 year, 6 months ago), 2021-12-16 08:37:33 -0800 • Engine revision 890a5fca2e • Dart version 2.15.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1) • Android SDK at /Users/maple/Library/Android/sdk • Platform android-33, build-tools 33.0.1 • ANDROID_HOME = /Users/maple/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2) • Xcode at /Applications/Xcode.app/Contents/Developer • CocoaPods version 1.11.3

[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1) • 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 11.0.15+0-b2043.56-8887301)

[✓] Connected device (3 available) • NAM AL00 (mobile) • 7SQVB22308012776 • android-arm64 • Android 12 (API 31) • lixf11 (mobile) • 00008030-000C6D881A83802E • ios • iOS 16.5.1 20F75 • Chrome (web) • chrome • web-javascript • Google Chrome 114.0.5735.133

user425846 commented 6 months ago

Same issue here, has anyone resolved this? It just completely breaks video playback on android for me

diegotori commented 6 months ago

Keep in mind that chewie is merely a wrapper around video_player.

This issue lies squarely at the feet of ExoPlayer, which video_player uses on the Android platform channel.

diegotori commented 6 months ago

Please raise an issue with the Flutter team regarding this. Thanks.