Getting CodecException intermittently
See original GitHub issue[REQUIRED] Content description
We are getting calls from our customer about playback issue with codec exception. Based on our log, we can see the same customer has been playing the same live (dash) channel every day. Whereas some time they are getting codec exception. Since they are playing a live content, there might be some codec issues while slicing the content but we are stuck when we got a report about VOD content as well. The same customer can play the VOD a few days back, but after 2 days they can’t play the same content due to codec exception.
05-14 19:11:09.582 I/OMXClient(27327): Treble IOmx obtained
05-14 19:11:09.582 E/HwExtendedCodec(27327): mime: video/avc matching compontent failed!
05-14 19:11:09.587 I/ACodec (27327): In onAllocateComponent create compenent, codec name: OMX.hisi.video.decoder.avc.secure
05-14 19:11:09.592 D/SurfaceUtils(27327): connecting to surface 0xbf63a008, reason connectToSurface
05-14 19:11:09.593 I/MediaCodec(27327): [OMX.hisi.video.decoder.avc.secure] setting surface generation to 27982849
05-14 19:11:09.593 D/SurfaceUtils(27327): disconnecting from surface 0xbf63a008, reason connectToSurface(reconnect)
05-14 19:11:09.593 D/SurfaceUtils(27327): connecting to surface 0xbf63a008, reason connectToSurface(reconnect)
05-14 19:11:09.594 E/ACodec (27327): [OMX.hisi.video.decoder.avc.secure] setPortMode on output to DynamicANWBuffer failed w/ err -2147483648
05-14 19:11:09.595 I/HwExtendedCodec(27327): mime is [video/avc] at setVideoFormat
05-14 19:11:09.597 I/ACodec (27327): codec does not support config priority (err -22)
05-14 19:11:09.605 I/ACodec (27327): onStart
05-14 19:11:09.609 E/ACodec (27327): Failed to allocate buffers after transitioning to IDLE state (error 0x80000000)
05-14 19:11:09.609 E/ACodec (27327): signalError(omxError 0x80001001, internalError -2147483648)
05-14 19:11:09.610 E/MediaCodec(27327): Codec reported err 0x80001001, actionCode 0, while in state 5
05-14 19:11:09.610 E/ACodec (27327): [OMX.hisi.video.decoder.avc.secure] ERROR(0x80001009)
05-14 19:11:09.610 E/ACodec (27327): signalError(omxError 0x80001009, internalError -2147483648)
05-14 19:11:09.610 E/ACodec (27327): [OMX.hisi.video.decoder.avc.secure] ERROR(0x80001009)
05-14 19:11:09.610 E/ACodec (27327): signalError(omxError 0x80001009, internalError -2147483648)
05-14 19:11:09.610 E/ACodec (27327): [OMX.hisi.video.decoder.avc.secure] ERROR(0x80001012)
05-14 19:11:09.610 E/ACodec (27327): signalError(omxError 0x80001012, internalError -2147483648)
05-14 19:11:09.610 E/ACodec (27327): [OMX.hisi.video.decoder.avc.secure] ERROR(0x80001012)
05-14 19:11:09.610 E/ACodec (27327): signalError(omxError 0x80001012, internalError -2147483648)
05-14 19:11:09.616 D/SurfaceUtils(27327): disconnecting from surface 0xbf63a008, reason disconnectFromSurface
05-14 19:11:09.618 E/MediaCodec(27327): Codec reported err 0x80001009, actionCode 0, while in state 0
05-14 19:11:09.618 E/MediaCodec(27327): Codec reported err 0x80001009, actionCode 0, while in state 0
05-14 19:11:09.618 E/MediaCodec(27327): Codec reported err 0x80001012, actionCode 0, while in state 0
05-14 19:11:09.618 E/MediaCodec(27327): Codec reported err 0x80001012, actionCode 0, while in state 0
05-14 19:11:09.626 W/MediaCodecRenderer(27327): Failed to initialize decoder: OMX.hisi.video.decoder.avc.secure
05-14 19:11:09.626 W/MediaCodecRenderer(27327): android.media.MediaCodec$CodecException: start failed
05-14 19:11:09.626 W/MediaCodecRenderer(27327): at android.media.MediaCodec.native_start(Native Method)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): at android.media.MediaCodec.start(MediaCodec.java:2071)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodec(MediaCodecRenderer.java:814)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodecWithFallback(MediaCodecRenderer.java:745)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:474)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.reinitializeCodec(MediaCodecRenderer.java:1261)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1111)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:552)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:647)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:536)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:303)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): at android.os.Handler.dispatchMessage(Handler.java:105)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): at android.os.Looper.loop(Looper.java:166)
05-14 19:11:09.626 W/MediaCodecRenderer(27327): at android.os.HandlerThread.run(HandlerThread.java:65)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): Playback error.
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): com.google.android.exoplayer2.ExoPlaybackException: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.hisi.video.decoder.avc.secure, Format(C, null, null, video/avc, avc1.4d001e, 736395, null, [640, 360, 30.0], [-1, -1])
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:479)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.reinitializeCodec(MediaCodecRenderer.java:1261)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1111)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:552)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:647)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:536)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:303)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): at android.os.Handler.dispatchMessage(Handler.java:105)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): at android.os.Looper.loop(Looper.java:166)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): at android.os.HandlerThread.run(HandlerThread.java:65)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): Caused by: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.hisi.video.decoder.avc.secure, Format(C, null, null, video/avc, avc1.4d001e, 736395, null, [640, 360, 30.0], [-1, -1])
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodecWithFallback(MediaCodecRenderer.java:753)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:474)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): ... 9 more
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): Caused by: android.media.MediaCodec$CodecException: start failed
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): at android.media.MediaCodec.native_start(Native Method)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): at android.media.MediaCodec.start(MediaCodec.java:2071)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodec(MediaCodecRenderer.java:814)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodecWithFallback(MediaCodecRenderer.java:745)
05-14 19:11:09.628 E/ExoPlayerImplInternal(27327): ... 10 more
[REQUIRED] Link to test content
I can’t provide any link
[REQUIRED] Version of ExoPlayer being used
2.9.6
[REQUIRED] Device(s) and version(s) of Android being used
Any device (we are supporting from 5.0 and upword)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:24 (1 by maintainers)
Top Results From Across the Web
Intermittent video codec error on Chrome for Android (Galaxy ...
I get an intermittent codec error on Chrome for Android when playing a video in my React ... MediaCodec$CodecException: Error 0xffffec77.
Read more >[Released] AVPro Video - complete video playback solution
Hi, getting trouble on Alpha Packing please help me [ATTACH] ... MediaCodec$CodecException: start failed at android.media.
Read more >TvInputService.Session - Android Developers
... to block the screen not to show any intermittent video artifacts. ... Override onOverlayViewSizeChanged(int, int) to get the size of the overlay...
Read more >102 messages from Google Code
Your project notifications generated too many emails to send individually. Here are the subject lines of the emails you would have received:
Read more >Diff - platform/frameworks/base - Google Git
CodecException extends java.lang.IllegalStateException { - method public ... setTransitionAlpha(alpha); + View view = views.get(i); + if (!mOriginalAlphas.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have a similar issue with the pixel 2 xl device. Once the playback stops it continuously stops for all successive media playback. Putting down the logs.
E/MediaCodec: queueCSDInputBuffer failed w/ error -2147483648 2019-11-21 19:47:00.800 E/ExoPlayerImplInternal: Internal runtime error. android.media.MediaCodec$CodecException: Error 0x80000000 at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method) at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:2789) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1287) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:663) at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:529) at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:300) at android.os.Handler.dispatchMessage(Handler.java:103) at android.os.Looper.loop(Looper.java:214) at android.os.HandlerThread.run(HandlerThread.java:67) 2019-11-21 19:47:00.807 D/BufferPoolAccessor: Destruction - bufferpool2 0x7367ebc620 cached: 0/0M, 0/0% in use; allocs: 4, 0% recycled; transfers: 0, 0% unfetced 2019-11-21 19:47:00.820 E/ExoPlayerImplInternal: Stop failed. android.media.MediaCodec$CodecException: Error 0x80000000 at android.media.MediaCodec.native_stop(Native Method) at android.media.MediaCodec.stop(MediaCodec.java:2147) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.releaseCodec(MediaCodecRenderer.java:608) at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onDisabled(MediaCodecRenderer.java:562) at com.google.android.exoplayer2.audio.MediaCodecAudioRenderer.onDisabled(MediaCodecAudioRenderer.java:542) at com.google.android.exoplayer2.BaseRenderer.disable(BaseRenderer.java:153) at com.google.android.exoplayer2.ExoPlayerImplInternal.disableRenderer(ExoPlayerImplInternal.java:976) at com.google.android.exoplayer2.ExoPlayerImplInternal.resetInternal(ExoPlayerImplInternal.java:764) at com.google.android.exoplayer2.ExoPlayerImplInternal.stopInternal(ExoPlayerImplInternal.java:735) at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:355) at android.os.Handler.dispatchMessage(Handler.java:103) at android.os.Looper.loop(Looper.java:214) at android.os.HandlerThread.run(HandlerThread.java:67) 2019-11-21 19:47:00.839 D/ExoPlayerWrapper: onPlayerError error type => 2 2019-11-21 19:47:00.839 E/ExoPlayerWrapper: android.media.MediaCodec$CodecException: Error 0x80000000 2019-11-21 19:47:00.839 E/ExoPlayerWrapper: Error-Event sent, type = 2
I have been trying to reproduce this issue from a couple of weeks and finally, I am able to reproduce this by enabling Charles. What I found this time is a bit different. Due to some Okhttp/Network interruption, Exoplayer ended up with a CodecException. Which means this is not a straight forward CodecException. So instead of stoping the playback, when retried the playback it worked for me.
Though out of 100, 30 times it was still failing for me with same CodecException. So on top of that, when I was retrying the playback, I removed the old SurfaceView and create a new one. By doing that right now our playback is stable enough. I don’t know why OkHttp got “InteruptedException” intermittently and why that is related to a CodecException and also SurfaceView.
I will keep testing these changes and will update you if it will fail.