Skip to content

Video player on Huawei Android 29 device does not play media #154068

Closed
flutter-team-archive/engine
#54879

Description

@KonstantenKomkov

What package does this bug report belong to?

video_player

What target platforms are you seeing this bug on?

Android

Have you already upgraded your packages?

Yes

Dependency versions

No response

Steps to reproduce

Run simple example of video player app. Problem in video_player_android 2.7.0 with 2.6.0 worked.
It may be related to #149721

Expected results

Video is playing

Actual results

Video not playing

Code sample

IMPELLER

Screenshots or Videos

No response

Logs

I/ExoPlayerImpl(22874): Init b456022 [AndroidXMedia3/1.4.0] [HWCLT, CLT-L29, HUAWEI, 29]
W/ple.food_drive(22874): Accessing hidden method Landroid/media/AudioTrack;->getLatency()I (greylist, reflection, allowed)
W/VideoCapabilities(22874): Unrecognized profile/level 0/0 for video/mpeg2
W/VideoCapabilities(22874): Unrecognized profile/level 0/2 for video/mpeg2
W/VideoCapabilities(22874): Unrecognized profile/level 0/3 for video/mpeg2
I/VideoCapabilities(22874): Unsupported profile 5 for video/mpeg2
I/chatty  (22874): uid=12958(com.example.food_driver) ExoPlayer:Playb identical 2 lines
I/VideoCapabilities(22874): Unsupported profile 5 for video/mpeg2
W/VideoCapabilities(22874): Unrecognized profile/level 1/32 for video/mp4v-es
W/VideoCapabilities(22874): Unrecognized profile/level 32768/2 for video/mp4v-es
W/VideoCapabilities(22874): Unrecognized profile/level 32768/64 for video/mp4v-es
I/OMXClient(22874): IOmx service obtained
I/ACodec  (22874): In onAllocateComponent create compenent, codec name: OMX.hisi.video.decoder.avc
D/SurfaceUtils(22874): connecting to surface 0x7eb25e8010, reason connectToSurface
I/MediaCodec(22874): [OMX.hisi.video.decoder.avc] setting surface generation to 23422977
D/SurfaceUtils(22874): disconnecting from surface 0x7eb25e8010, reason connectToSurface(reconnect)
D/SurfaceUtils(22874): connecting to surface 0x7eb25e8010, reason connectToSurface(reconnect)
E/ACodec  (22874): [OMX.hisi.video.decoder.avc] setPortMode on output to DynamicANWBuffer failed w/ err -2147483648
I/ACodec  (22874): [OMX.hisi.video.decoder.avc] got color aspects (R:2(Limited), P:1(BT709_5), M:1(BT709_5), T:3(SMPTE170M)) err=0(NO_ERROR)
I/ACodec  (22874): [OMX.hisi.video.decoder.avc] got color aspects (R:2(Limited), P:1(BT709_5), M:1(BT709_5), T:3(SMPTE170M)) err=0(NO_ERROR)
I/ACodec  (22874): [OMX.hisi.video.decoder.avc] using color aspects (R:2(Limited), P:1(BT709_5), M:1(BT709_5), T:3(SMPTE170M)) and dataspace 0x104
I/ACodec  (22874): onStart
I/HwExtendedUtils(22874): Set to window composer mode as 2
I/ACodec  (22874): gralloc usage: 0(OMX) => 0x2900(ACodec)
D/SurfaceUtils(22874): disconnecting from surface 0x7eb25e8010, reason setNativeWindowSizeFormatAndUsage
D/SurfaceUtils(22874): connecting to surface 0x7eb25e8010, reason setNativeWindowSizeFormatAndUsage
D/SurfaceUtils(22874): set up nativeWindow 0x7eb25e8010 for 1280x1280, color 0x30d, rotation 0, usage 0x2900
W/ACodec  (22874): [OMX.hisi.video.decoder.avc] setting nBufferCountActual to 10 failed: -1010
W/ACodec  (22874): [OMX.hisi.video.decoder.avc] setting nBufferCountActual to 9 failed: -1010
I/ACodec  (22874): [OMX.hisi.video.decoder.avc] Allocating 8 buffers from a native window of size 2703360 on output port
W/Gralloc3(22874): allocator 3.x is not supported
I/ACodec  (22874): [OMX.hisi.video.decoder.avc] got color aspects (R:2(Limited), P:1(BT709_5), M:1(BT709_5), T:3(SMPTE170M)) err=0(NO_ERROR)
I/ACodec  (22874): [OMX.hisi.video.decoder.avc] got color aspects (R:2(Limited), P:1(BT709_5), M:1(BT709_5), T:3(SMPTE170M)) err=0(NO_ERROR)
I/ACodec  (22874): [OMX.hisi.video.decoder.avc] using color aspects (R:2(Limited), P:1(BT709_5), M:1(BT709_5), T:3(SMPTE170M)) and dataspace 0x104
I/ACodec  (22874): [OMX.hisi.video.decoder.avc] Now handling output port settings change
I/ACodec  (22874): [OMX.hisi.video.decoder.avc] Output port now disabled.
I/HwExtendedUtils(22874): Set to window composer mode as 2
I/ACodec  (22874): gralloc usage: 0(OMX) => 0x2900(ACodec)
D/SurfaceUtils(22874): disconnecting from surface 0x7eb25e8010, reason setNativeWindowSizeFormatAndUsage
D/SurfaceUtils(22874): connecting to surface 0x7eb25e8010, reason setNativeWindowSizeFormatAndUsage
D/SurfaceUtils(22874): set up nativeWindow 0x7eb25e8010 for 1280x1280, color 0x30d, rotation 0, usage 0x2900
W/ACodec  (22874): [OMX.hisi.video.decoder.avc] setting nBufferCountActual to 16 failed: -1010
W/ACodec  (22874): [OMX.hisi.video.decoder.avc] setting nBufferCountActual to 15 failed: -1010
W/ACodec  (22874): [OMX.hisi.video.decoder.avc] setting nBufferCountActual to 14 failed: -1010
W/ACodec  (22874): [OMX.hisi.video.decoder.avc] setting nBufferCountActual to 13 failed: -1010
E/ACodec  (22874): Failed to allocate output port buffers after port reconfiguration: (-1010)
E/ACodec  (22874): signalError(omxError 0x80001001, internalError -1010)
E/ACodec  (22874): Error occurred while disabling the output port
E/MediaCodec(22874): Codec reported err 0xfffffc0e, actionCode 0, while in state 6
D/SurfaceUtils(22874): disconnecting from surface 0x7eb25e8010, reason disconnectFromSurface
E/MediaCodecVideoRenderer(22874): Video codec error
E/MediaCodecVideoRenderer(22874):   java.lang.IllegalStateException
E/MediaCodecVideoRenderer(22874):       at android.media.MediaCodec.native_queueInputBuffer(Native Method)
E/MediaCodecVideoRenderer(22874):       at android.media.MediaCodec.queueInputBuffer(MediaCodec.java:2450)
E/MediaCodecVideoRenderer(22874):       at androidx.media3.exoplayer.mediacodec.SynchronousMediaCodecAdapter.queueInputBuffer(SynchronousMediaCodecAdapter.java:145)
E/MediaCodecVideoRenderer(22874):       at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:1485)
E/MediaCodecVideoRenderer(22874):       at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:875)
E/MediaCodecVideoRenderer(22874):       at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.render(MediaCodecVideoRenderer.java:1018)
E/MediaCodecVideoRenderer(22874):       at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1136)
E/MediaCodecVideoRenderer(22874):       at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:561)
E/MediaCodecVideoRenderer(22874):       at android.os.Handler.dispatchMessage(Handler.java:106)
E/MediaCodecVideoRenderer(22874):       at android.os.Looper.loop(Looper.java:219)
E/MediaCodecVideoRenderer(22874):       at android.os.HandlerThread.run(HandlerThread.java:67)
E/ExoPlayerImplInternal(22874): Playback error
E/ExoPlayerImplInternal(22874):   androidx.media3.exoplayer.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/avc, avc1.640028, -1, null, [1280, 1280, 25.0, ColorInfo(Unset color space, Unset color range, Unset color transfer, false, 8bit Luma, 8bit Chroma)], [-1, -1]), format_supported=YES
E/ExoPlayerImplInternal(22874):       at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:640)
E/ExoPlayerImplInternal(22874):       at android.os.Handler.dispatchMessage(Handler.java:106)
E/ExoPlayerImplInternal(22874):       at android.os.Looper.loop(Looper.java:219)
E/ExoPlayerImplInternal(22874):       at android.os.HandlerThread.run(HandlerThread.java:67)
E/ExoPlayerImplInternal(22874):   Caused by: androidx.media3.exoplayer.video.MediaCodecVideoDecoderException: Decoder failed: OMX.hisi.video.decoder.avc
E/ExoPlayerImplInternal(22874):       at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.createDecoderException(MediaCodecVideoRenderer.java:1982)
E/ExoPlayerImplInternal(22874):       at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:893)
E/ExoPlayerImplInternal(22874):       at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.render(MediaCodecVideoRenderer.java:1018)
E/ExoPlayerImplInternal(22874):       at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1136)
E/ExoPlayerImplInternal(22874):       at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:561)
E/ExoPlayerImplInternal(22874):       ... 3 more
E/ExoPlayerImplInternal(22874):   Caused by: java.lang.IllegalStateException
E/ExoPlayerImplInternal(22874):       at android.media.MediaCodec.native_queueInputBuffer(Native Method)
E/ExoPlayerImplInternal(22874):       at android.media.MediaCodec.queueInputBuffer(MediaCodec.java:2450)
E/ExoPlayerImplInternal(22874):       at androidx.media3.exoplayer.mediacodec.SynchronousMediaCodecAdapter.queueInputBuffer(SynchronousMediaCodecAdapter.java:145)
E/ExoPlayerImplInternal(22874):       at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.feedInputBuffer(MediaCodecRenderer.java:1485)
E/ExoPlayerImplInternal(22874):       at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:875)
E/ExoPlayerImplInternal(22874):       ... 6 more
E/ExoPlayerImplInternal(22874): Disable failed.
E/ExoPlayerImplInternal(22874):   java.lang.IllegalStateException
E/ExoPlayerImplInternal(22874):       at android.media.MediaCodec.native_flush(Native Method)
E/ExoPlayerImplInternal(22874):       at android.media.MediaCodec.flush(MediaCodec.java:2194)
E/ExoPlayerImplInternal(22874):       at androidx.media3.exoplayer.mediacodec.SynchronousMediaCodecAdapter.flush(SynchronousMediaCodecAdapter.java:168)
E/ExoPlayerImplInternal(22874):       at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.flushCodec(MediaCodecRenderer.java:960)
E/ExoPlayerImplInternal(22874):       at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.flushOrReleaseCodec(MediaCodecRenderer.java:953)
E/ExoPlayerImplInternal(22874):       at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.onDisabled(MediaCodecRenderer.java:780)
E/ExoPlayerImplInternal(22874):       at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.onDisabled(MediaCodecVideoRenderer.java:794)
E/ExoPlayerImplInternal(22874):       at androidx.media3.exoplayer.BaseRenderer.disable(BaseRenderer.java:220)
E/ExoPlayerImplInternal(22874):       at androidx.media3.exoplayer.ExoPlayerImplInternal.disableRenderer(ExoPlayerImplInternal.java:1846)
E/ExoPlayerImplInternal(22874):       at androidx.media3.exoplayer.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:1566)
E/ExoPlayerImplInternal(22874):       at androidx.media3.exoplayer.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:1523)
E/ExoPlayerImplInternal(22874):       at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:686)
E/ExoPlayerImplInternal(22874):       at android.os.Handler.dispatchMessage(Handler.java:106)
E/ExoPlayerImplInternal(22874):       at android.os.Looper.loop(Looper.java:219)
E/ExoPlayerImplInternal(22874):       at android.os.HandlerThread.run(HandlerThread.java:67)

Flutter Doctor output

Flutter 3.24.1

Activity

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

    @huycozy
    Member

    Looks like this is similar to your old reported issue at #149721 and seems to relate to Impeller. I see the latest version 2.7.1 has reverted Impeller support (https://pub.dev/packages/video_player_android/changelog#271), can you check and confirm?

  3. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Aug 26, 2024
  4. matanlurey commented on Aug 26, 2024

    @matanlurey
    Contributor

    We rolled forward, so if it was valid before it is likely valid now.

  5. matanlurey commented on Aug 26, 2024

    @matanlurey
    Contributor

    @jonahwilliams Have we had to do anything special for a HUAWEI/29 device before?

    Looks like (without looking deeper) possibly something to do with ImageReader+Android 29 (on Huawai)

  6. added
    platform-androidAndroid applications specifically
    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 Aug 26, 2024
  7. changed the title [-][Android][Impeller][/-] [+]Video player on Huawei Android 29 device does not play media[/+] on Aug 26, 2024
  8. added
    e: impellerImpeller rendering backend issues and features requests
    on Aug 26, 2024
  9. KonstantenKomkov commented on Aug 26, 2024

    @KonstantenKomkov
    Author

    With 2.7.1 version worked becouse version comment is "Revert Impeller support."

  10. matanlurey commented on Aug 26, 2024

    @matanlurey
    Contributor

    With 2.7.1 version worked becouse version comment is "Revert Impeller support."

    Konstanten, does this issue happen on the video player example application, or only your own codebase?

    https://github.com/flutter/packages/tree/main/packages/video_player/video_player_android/example

  11. KonstantenKomkov commented on Aug 26, 2024

    @KonstantenKomkov
    Author

    Problem is reproduced in the sample code from the video_player library.

  12. matanlurey commented on Aug 26, 2024

    @matanlurey
    Contributor

    Thanks, that is very useful. We'll try to acquire a test device and I'll leave this issue open.

  13. 3 remaining items

  14. jonahwilliams commented on Aug 26, 2024

    @jonahwilliams
    Contributor

    @KonstantenKomkov what is the device model that you are seeing these issues on?

  15. KonstantenKomkov commented on Aug 26, 2024

    @KonstantenKomkov
    Author

    Huawei p20 pro

  16. jonahwilliams commented on Aug 26, 2024

    @jonahwilliams
    Contributor

    Thanks!

  17. jonahwilliams commented on Aug 29, 2024

    @jonahwilliams
    Contributor

    I can confirm that the AHB import does not work on certain Huawei devices, so I'm adding support for falling back to the old approach here:

    flutter-team-archive/engine#54879

    This makes the video player examples work for me and still supports vulkan.

  18. added
    r: fixedIssue is closed as already fixed in a newer version
    on Aug 30, 2024
  19. github-actions commented on Sep 25, 2024

    @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 25, 2024
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 liste: impellerImpeller rendering backend issues and features requestse: impeller-naughty-driverDevices & drivers that may be behaving unexpectedly and may need workarounds.p: video_playerThe Video Player pluginplatform-androidAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions