ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

HLS MediaCodecVideoRenderer error, index=0, format=Format(18, null, null, video/avc, avc1.64001E, 1340651, null, [768, 432, 24.0], [-1, -1]), format_supported=YES

Open mostafaashraf92 opened this issue 2 years ago • 15 comments

Bug

I am trying to play HLS content and it plays as expected, but sometimes i get this error and playback continues though. HLS MediaCodecVideoRenderer error, index=0, format=Format(18, null, null, video/avc, avc1.64001E, 1340651, null, [768, 432, 24.0], [-1, -1]), format_supported=YES.

Here is the logs for the playback error

06-14 01:01:06.183   814   880 I SprdVideoDecoderOMXComponent: getExtensionIndex, name: OMX.google.android.index.AndroidNativeBufferConsumerUsage
06-14 01:01:06.183   814   880 I SprdVideoDecoderOMXComponent: getExtensionIndex, name: OMX.google.android.index.getAndroidNativeBufferUsage
06-14 01:01:06.183   814   880 I SPRDAVCDecoder: internalGetParameter, OMX_IndexGetAndroidNativeBufferUsage 0x33
06-14 01:01:06.183 14447 25666 D SurfaceUtils: disconnecting from surface 0xb400007afbe59010, reason setNativeWindowSizeFormatAndUsage
06-14 01:01:06.183 14447 25666 E Surface : freeAllBuffers: 3 buffers were freed while being dequeued!
06-14 01:01:06.183 14447 25666 E BufferQueueProducer: [SurfaceView[com.dott.android/com.dott.android.MainActivity]@0#53(BLAST Consumer)53](id:386f00000099,api:0,p:-1,c:14447) disconnect: not connected (req=3)
06-14 01:01:06.183 14447 25666 E SurfaceUtils: Failed to disconnect from surface 0xb400007afbe59010, err -19
06-14 01:01:06.183 14447 25666 E SurfaceUtils: nativeWindowDisconnect failed: No such device (19)
06-14 01:01:06.183 14447 25666 E ACodec  : Failed to allocate output port buffers after port reconfiguration: (-19)
06-14 01:01:06.184 14447 25666 E ACodec  : signalError(omxError 0x80001001, internalError -19)
06-14 01:01:06.184 14447 25666 E ACodec  : Error occurred while disabling the output port
06-14 01:01:06.184 14447 25665 E MediaCodec: Codec reported err 0xffffffed/NO_INIT, actionCode 0, while in state 0/UNINITIALIZED
06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal: Playback error
06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal:   com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(18, null, null, video/avc, avc1.64001E, 1340651, null, [768, 432, 24.0], [-1, -1]), format_supported=YES
06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:571)
06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal:       at android.os.Handler.dispatchMessage(Handler.java:102)
06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal:       at android.os.Looper.loopOnce(Looper.java:226)
06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal:       at android.os.Looper.loop(Looper.java:313)
06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal:       at android.os.HandlerThread.run(HandlerThread.java:67)
06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal:   Caused by: com.google.android.exoplayer2.video.MediaCodecVideoDecoderException: Decoder failed: OMX.sprd.h264.decoder
06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.createDecoderException(MediaCodecVideoRenderer.java:1629)
06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:813)
06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:994)
06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:495)
06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal:       ... 4 more
06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal:   Caused by: android.media.MediaCodec$CodecException: Error 0xffffff92
06-14 01:01:06.188   688   731 I gralloc4: unregister: id=27c0000400c, handle:0xb4000071ad2f8300, vaddr=0x7188a3a000
06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal: Disable failed.
06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal:   java.lang.IllegalStateException
06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal:       at android.media.MediaCodec.native_flush(Native Method)
06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal:       at android.media.MediaCodec.flush(MediaCodec.java:2388)
06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.mediacodec.AsynchronousMediaCodecAdapter.flush(AsynchronousMediaCodecAdapter.java:228)
06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.flushCodec(MediaCodecRenderer.java:877)
06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.flushOrReleaseCodec(MediaCodecRenderer.java:870)
06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onDisabled(MediaCodecRenderer.java:710)
06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onDisabled(MediaCodecVideoRenderer.java:608)
06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.BaseRenderer.disable(BaseRenderer.java:186)
06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.ExoPlayerImplInternal.disableRenderer(ExoPlayerImplInternal.java:1655)
06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:1396)
06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:1359)
06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal:       at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:587)
06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal:       at android.os.Handler.dispatchMessage(Handler.java:102)
06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal:       at android.os.Looper.loopOnce(Looper.java:226)
06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal:       at android.os.Looper.loop(Looper.java:313)
06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal:       at android.os.HandlerThread.run(HandlerThread.java:67)
06-14 01:01:06.188   688   731 I gralloc4: unregister: id=27c0000400e, handle:0xb4000071ad2b7600, vaddr=0x7188c7a000
06-14 01:01:06.189   688   731 I gralloc4: unregister: id=27c0000400f, handle:0xb4000071ad2f8100, vaddr=0x7188afa000
06-14 01:01:06.189   688   731 I gralloc4: unregister: id=27c00004010, handle:0xb4000071ad2f8b00, vaddr=0x718873a000
06-14 01:01:06.189 14447 25672 I CCodec  : state->set(FLUSHING)
06-14 01:01:06.189   688   731 I gralloc4: unregister: id=27c00004015, handle:0xb4000071ad307400, vaddr=0x718606a000
06-14 01:01:06.190   688   731 I gralloc4: unregister: id=27c0000400d, handle:0xb4000071ad2b7f00, vaddr=0x7188bba000
06-14 01:01:06.190   688   731 I gralloc4: unregister: id=27c00004012, handle:0xb4000071ad2f8500, vaddr=0x718897a000
06-14 01:01:06.190   688   731 I gralloc4: unregister: id=27c00004014, handle:0xb4000071ad307a00, vaddr=0x7185faa000
06-14 01:01:06.190   688   731 I gralloc4: unregister: id=27c0000400b, handle:0xb4000071ad2a5e00, vaddr=0x718bde4000
06-14 01:01:06.191   688   731 I gralloc4: unregister: id=27c00004016, handle:0xb4000071ad2f8e00, vaddr=0x718867a000
06-14 01:01:06.191 14447 25672 I CCodec  : state->set(FLUSHED)
06-14 01:01:06.191 14447 25672 D CCodecBuffers: [c2.android.aac.decoder#549:1D-Output.Impl[N]] Client returned a buffer it does not own according to our record: 0
06-14 01:01:06.191 14447 25672 D CCodecBuffers: [c2.android.aac.decoder#549:1D-Output.Impl[N]] Client returned a buffer it does not own according to our record: 1
06-14 01:01:06.191 14447 25672 D CCodecBuffers: [c2.android.aac.decoder#549:1D-Output.Impl[N]] Client returned a buffer it does not own according to our record: 2
06-14 01:01:06.191 14447 25644 D MediaCodec: keep callback message for reclaim
06-14 01:01:06.191 14447 25672 I CCodec  : state->set(RESUMING)
06-14 01:01:06.192 14447 25672 I CCodecConfig: query failed after returning 20 values (BAD_INDEX)
06-14 01:01:06.192   680   827 V APM_AudioPolicyManager: releaseOutput portId 350
06-14 01:01:06.192   680   827 V APM_AudioPolicyManager: releaseOutput() 13
06-14 01:01:06.192 14447 25672 W Codec2Client: query -- param skipped: index = 1342179345.
06-14 01:01:06.192 14447 25672 W Codec2Client: query -- param skipped: index = 2415921170.
06-14 01:01:06.192 14447 25672 W Codec2Client: query -- param skipped: index = 1610614798.
06-14 01:01:06.193 14447 25672 I CCodec  : state->set(RUNNING)
06-14 01:01:06.193   647  1129 I SEC_componentStore: >>SEC Codec2's2 SetIonUsage : 1
06-14 01:01:06.194   647  1129 I SEC_componentStore: >>SEC Codec2's SetIonUsage
06-14 01:01:06.194 14447 25672 D BufferPoolAccessor2.0: bufferpool2 0xb400007ae5208028 : 1(8192 size) total buffers - 1(8192 size) used buffers - 7700/7716 (recycle/alloc) - 15/7715 (fetch/transfer)
06-14 01:01:06.195 14447 25672 I CCodecBufferChannel: [c2.android.aac.decoder#549] 4 initial input buffers available
06-14 01:01:06.198 14447 25672 I CCodec  : state->set(RELEASING)
06-14 01:01:06.199 14447 25672 D CCodecBufferChannel: [c2.android.aac.decoder#549] MediaCodec discarded an unknown buffer
06-14 01:01:06.199 14447 25808 I CCodec  : [c2.android.aac.decoder] release(1)
06-14 01:01:06.199 14447 25672 D CCodecBufferChannel: [c2.android.aac.decoder#549] MediaCodec discarded an unknown buffer
06-14 01:01:06.199 14447 25672 D CCodecBufferChannel: [c2.android.aac.decoder#549] MediaCodec discarded an unknown buffer
06-14 01:01:06.199 14447 25672 D CCodecBufferChannel: [c2.android.aac.decoder#549] MediaCodec discarded an unknown buffer
06-14 01:01:06.200 14447 25808 I CCodec  : state->set(RELEASED)
06-14 01:01:06.200 14447 25672 I hw-BpHwBinder: onLastStrongRef automatically unlinking death recipients
06-14 01:01:06.200   847 11639 I hw-BpHwBinder: onLastStrongRef automatically unlinking death recipients
06-14 01:01:06.200   847 11639 I hw-BpHwBinder: onLastStrongRef automatically unlinking death recipients

Exoplayer version 2.18.2 . Knowing that i verified that i release the exoplayer instance as expected by the end of every playback session. And no retained instance. Knowing that this issue happens in the middle of playback as well

mostafaashraf92 avatar Jun 19 '23 20:06 mostafaashraf92

And here are more logs 06-14 01:01:06.183 814 880 I SprdVideoDecoderOMXComponent: getExtensionIndex, name: OMX.google.android.index.AndroidNativeBufferConsumerUsage 06-14 01:01:06.183 814 880 I SprdVideoDecoderOMXComponent: getExtensionIndex, name: OMX.google.android.index.getAndroidNativeBufferUsage 06-14 01:01:06.183 814 880 I SPRDAVCDecoder: internalGetParameter, OMX_IndexGetAndroidNativeBufferUsage 0x33 06-14 01:01:06.183 14447 25666 D SurfaceUtils: disconnecting from surface 0xb400007afbe59010, reason setNativeWindowSizeFormatAndUsage 06-14 01:01:06.183 14447 25666 E Surface : freeAllBuffers: 3 buffers were freed while being dequeued! 06-14 01:01:06.183 14447 25666 E BufferQueueProducer: SurfaceView[com.dott.android/com.dott.android.MainActivity]@0#53(BLAST Consumer)53 disconnect: not connected (req=3) 06-14 01:01:06.183 14447 25666 E SurfaceUtils: Failed to disconnect from surface 0xb400007afbe59010, err -19 06-14 01:01:06.183 14447 25666 E SurfaceUtils: nativeWindowDisconnect failed: No such device (19) 06-14 01:01:06.183 14447 25666 E ACodec : Failed to allocate output port buffers after port reconfiguration: (-19) 06-14 01:01:06.184 14447 25666 E ACodec : signalError(omxError 0x80001001, internalError -19) 06-14 01:01:06.184 14447 25666 E ACodec : Error occurred while disabling the output port 06-14 01:01:06.184 14447 25665 E MediaCodec: Codec reported err 0xffffffed/NO_INIT, actionCode 0, while in state 0/UNINITIALIZED 06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal: Playback error 06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal: com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(18, null, null, video/avc, avc1.64001E, 1340651, null, [768, 432, 24.0], [-1, -1]), format_supported=YES 06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal: at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:571) 06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal: at android.os.Handler.dispatchMessage(Handler.java:102) 06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal: at android.os.Looper.loopOnce(Looper.java:226) 06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal: at android.os.Looper.loop(Looper.java:313) 06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal: at android.os.HandlerThread.run(HandlerThread.java:67) 06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal: Caused by: com.google.android.exoplayer2.video.MediaCodecVideoDecoderException: Decoder failed: OMX.sprd.h264.decoder 06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal: at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.createDecoderException(MediaCodecVideoRenderer.java:1629) 06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal: at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:813) 06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal: at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:994) 06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal: at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:495) 06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal: ... 4 more 06-14 01:01:06.184 14447 25644 E ExoPlayerImplInternal: Caused by: android.media.MediaCodec$CodecException: Error 0xffffff92 06-14 01:01:06.188 688 731 I gralloc4: unregister: id=27c0000400c, handle:0xb4000071ad2f8300, vaddr=0x7188a3a000 06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal: Disable failed. 06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal: java.lang.IllegalStateException 06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal: at android.media.MediaCodec.native_flush(Native Method) 06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal: at android.media.MediaCodec.flush(MediaCodec.java:2388) 06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal: at com.google.android.exoplayer2.mediacodec.AsynchronousMediaCodecAdapter.flush(AsynchronousMediaCodecAdapter.java:228) 06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal: at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.flushCodec(MediaCodecRenderer.java:877) 06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal: at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.flushOrReleaseCodec(MediaCodecRenderer.java:870) 06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal: at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onDisabled(MediaCodecRenderer.java:710) 06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal: at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onDisabled(MediaCodecVideoRenderer.java:60

mostafaashraf92 avatar Jun 19 '23 21:06 mostafaashraf92

Please provide complete information as requested in the issue template. The issue template can be found here. If you're unable to share bug reports or test content publicly, please send them to [email protected] using a subject in the format "Issue #1234", where "#1234" should be replaced with your issue number. Please also update this issue to indicate you’ve done this.

Looks like a codec problem on a device. We'd need content and a bug report to make this actionable I think. Even then, it will probably be difficult to repro unless you give us some repro steps. It looks like this happens on disable, is this always the case? What was working happening on the device before this occured?

06-14 01:01:06.188 14447 25644 E ExoPlayerImplInternal: Disable failed.

marcbaechinger avatar Jun 22 '23 08:06 marcbaechinger

getting similar error on Xiaomi POCO F1

com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/avc, avc1.640034, -1, null, [2160, 4096, 25.0], [-1, -1]), format_supported=YES

shahbazhashmi avatar May 18 '24 16:05 shahbazhashmi

Also getting similar error. I wrote a Flutter App for Android and iOS. Error occurs to more than 96% on Android 10 video_player: 2.8.1

ExoPlaybackException MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/avc, avc1.4D4029, -1, null, [1080, 1920, 25.0], [-1, -1]), format_supported=YES Wxc PlatformException(VideoError, Video player had error com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/avc, avc1.4D4029, -1, null, [1080, 1920, 25.0], [-1, -1]), format_supported=YES, null, null)

HaraldWolz avatar Jun 28 '24 12:06 HaraldWolz

Did somebody solve this problem cause i have this too(

10Wyk avatar Sep 09 '24 07:09 10Wyk

I have this error on Android 10 [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(VideoError, Video player had error com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/avc, avc1.4D4029, -1, null, [1920, 1080, 25.0], [-1, -1]), format_supported=YES, null, null)

DevAmma237 avatar Sep 11 '24 10:09 DevAmma237

any updates, I'm facing same issue

msayed-net avatar Oct 02 '24 14:10 msayed-net

We have the exact same issue.

marf avatar Oct 09 '24 17:10 marf

same here

OnClickListener2048 avatar Oct 31 '24 16:10 OnClickListener2048

Also getting similar error. I wrote a Flutter App for Android and iOS. Error occurs to more than 96% on Android 10 video_player: 2.8.1

ExoPlaybackException MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/avc, avc1.4D4029, -1, null, [1080, 1920, 25.0], [-1, -1]), format_supported=YES Wxc PlatformException(VideoError, Video player had error com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/avc, avc1.4D4029, -1, null, [1080, 1920, 25.0], [-1, -1]), format_supported=YES, null, null)

hey yooo i have the same error also exactly like you did u solved it ?

YousefSalem01 avatar Dec 25 '24 23:12 YousefSalem01

I experienced this issue in Flutter. I was able to overcome it by upgrading to Flutter 3.27.2 and disabling Impeller. Everything now works as it should.

Eittipat avatar Jan 18 '25 13:01 Eittipat

there is any solution for this problem in React Native?

karamanmertcan avatar Feb 07 '25 08:02 karamanmertcan

there is any solution for this problem in React Native?

downgrade exoplayer version would solve this.

OnClickListener2048 avatar Feb 07 '25 08:02 OnClickListener2048

there is any solution for this problem in React Native?

downgrade exoplayer version would solve this.

which versio should i use? 2.19.0 also gives the error.

karamanmertcan avatar Feb 10 '25 07:02 karamanmertcan