androidx / media

Jetpack Media3 support libraries for media use cases, including ExoPlayer, an extensible media player for Android
https://developer.android.com/media/media3
Apache License 2.0
1.59k stars 377 forks source link

c2.android.aac.decoder failure to decode #1599

Open hafiz013 opened 1 month ago

hafiz013 commented 1 month ago

Version

Media3 1.3.1

More version details

implementation 'androidx.media3:media3-exoplayer:1.3.1' implementation 'androidx.media3:media3-ui:1.3.1' implementation 'androidx.media3:media3-common:1.3.1'

Devices that reproduce the issue

Android version : 11 Device Type : Osprey Model : C71KW-400

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Not tested

Reproduction steps

I got the following error:

Audio codec error (Ask Gemini)
  java.lang.IllegalStateException
      at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
      at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:3452)
      at androidx.media3.exoplayer.mediacodec.SynchronousMediaCodecAdapter.dequeueOutputBufferIndex(SynchronousMediaCodecAdapter.java:108)
      at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1934)
      at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:827)
      at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1112)
      at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:544)
      at android.os.Handler.dispatchMessage(Handler.java:102)
      at android.os.Looper.loop(Looper.java:223)
      at android.os.HandlerThread.run(HandlerThread.java:67)
Playback error (Ask Gemini)
  androidx.media3.exoplayer.ExoPlaybackException: MediaCodecAudioRenderer error, index=1, format=Format(2, null, null, audio/mp4a-latm, mp4a.40.2, 317658, en, [-1, -1, -1.0, null], [2, 44100]), format_supported=YES
      at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:623)
      at android.os.Handler.dispatchMessage(Handler.java:102)
      at android.os.Looper.loop(Looper.java:223)
      at android.os.HandlerThread.run(HandlerThread.java:67)
  Caused by: androidx.media3.exoplayer.mediacodec.MediaCodecDecoderException: Decoder failed: c2.android.aac.decoder
      at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.createDecoderException(MediaCodecRenderer.java:976)
      at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:848)
      at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1112)
      at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:544)
      at android.os.Handler.dispatchMessage(Handler.java:102) 
      at android.os.Looper.loop(Looper.java:223) 
      at android.os.HandlerThread.run(HandlerThread.java:67) 
  Caused by: java.lang.IllegalStateException
      at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
      at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:3452)
      at androidx.media3.exoplayer.mediacodec.SynchronousMediaCodecAdapter.dequeueOutputBufferIndex(SynchronousMediaCodecAdapter.java:108)
      at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1934)
      at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:827)
      at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1112) 
      at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:544) 
      at android.os.Handler.dispatchMessage(Handler.java:102) 
      at android.os.Looper.loop(Looper.java:223) 
      at android.os.HandlerThread.run(HandlerThread.java:67) 
-------------------------------------------------------------------------------------------------------------------------------
onVideoSizeChanged()=> width: 0 height: 0 unappliedRotationDegrees: 0 pixelWidthHeightRatio: 1.0

Disable failed. (Ask Gemini)
  java.lang.IllegalStateException
      at android.media.MediaCodec.native_flush(Native Method)
      at android.media.MediaCodec.flush(MediaCodec.java:2298)
      at androidx.media3.exoplayer.mediacodec.SynchronousMediaCodecAdapter.flush(SynchronousMediaCodecAdapter.java:168)
      at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.flushCodec(MediaCodecRenderer.java:912)
      at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.flushOrReleaseCodec(MediaCodecRenderer.java:905)
      at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.onDisabled(MediaCodecRenderer.java:744)
      at androidx.media3.exoplayer.audio.MediaCodecAudioRenderer.onDisabled(MediaCodecAudioRenderer.java:644)
      at androidx.media3.exoplayer.BaseRenderer.disable(BaseRenderer.java:220)
      at androidx.media3.exoplayer.ExoPlayerImplInternal.disableRenderer(ExoPlayerImplInternal.java:1803)
      at androidx.media3.exoplayer.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:1525)
      at androidx.media3.exoplayer.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:1482)
      at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:667)
      at android.os.Handler.dispatchMessage(Handler.java:102)
      at android.os.Looper.loop(Looper.java:223)
      at android.os.HandlerThread.run(HandlerThread.java:67)

already send to email : dev.exoplayer@gmail.com and android-media-github@google.com

Expected result

The media play should be play successfully

Actual result

The video doesn't play at all.

Media

url play video : I already send to the email. I can't share here due to privacy policy.

Bug Report

microkatz commented 1 month ago

Hello @hafiz013,

Thank you for reporting your issue! I tried playing the file that you send to our support email but the file was not accessible. The host site is seeming to restrict access due to region. Is there any way that you could fix those limitations or send the file again but plainly?

hafiz013 commented 1 month ago

You have to use express vpn or any kind of vpn that pointed to US region.

On Tue, 6 Aug 2024 at 8:17 PM, Michael Katz @.***> wrote:

Hello @hafiz013 https://github.com/hafiz013,

Thank you for reporting your issue! I tried playing the file that you send to our support email but the file was not accessible. The host site is seeming to restrict access due to region. Is there any way that you could fix those limitations or send the file again but plainly?

— Reply to this email directly, view it on GitHub https://github.com/androidx/media/issues/1599#issuecomment-2271151412, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTFQGCXZYXK64DPX2RNQMDZQC5EZAVCNFSM6AAAAABMBNCHFGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZRGE2TCNBRGI . You are receiving this because you were mentioned.Message ID: @.***>