Exoplayer : Playback error

See original GitHub issue

I had recorded video of 1920 X 1080,1280 X720 size on device and Its stored in internal sotrage, now this video unable to play, below you can find bug report and detail. Device name: samsung galaxy j3 os 8.1.0,samsung S7 edge os 8.0.0, samsung s6 below 1920 X 1080 are worked properly,but using above and this size got error like “playback error” while initialize exoplayer every time. version of exoplayer : 2.9.0

E/ExoPlayerImplInternal: Playback error.
    com.google.android.exoplayer2.ExoPlaybackException: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.Exynos.avc.dec, Format(1, null, null, video/avc, null, -1, null, [1920, 1080, -1.0], [-1, -1])
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:479)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.reinitializeCodec(MediaCodecRenderer.java:1261)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1111)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:552)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:647)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:536)
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:303)
        at android.os.Handler.dispatchMessage(Handler.java:101)
        at android.os.Looper.loop(Looper.java:164)
        at android.os.HandlerThread.run(HandlerThread.java:65)
     Caused by: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.Exynos.avc.dec, Format(1, null, null, video/avc, null, -1, null, [1920, 1080, -1.0], [-1, -1])
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodecWithFallback(MediaCodecRenderer.java:753)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:474)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.reinitializeCodec(MediaCodecRenderer.java:1261) 
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1111) 
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:552) 
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:647) 
        at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:536) 
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:303) 
        at android.os.Handler.dispatchMessage(Handler.java:101) 
        at android.os.Looper.loop(Looper.java:164) 
        at android.os.HandlerThread.run(HandlerThread.java:65) 
     Caused by: android.media.MediaCodec$CodecException: Error 0xffffec77
        at android.media.MediaCodec.native_configure(Native Method)
        at android.media.MediaCodec.configure(MediaCodec.java:1935)
        at android.media.MediaCodec.configure(MediaCodec.java:1864)
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.configureCodec(MediaCodecVideoRenderer.java:483)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodec(MediaCodecRenderer.java:805)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodecWithFallback(MediaCodecRenderer.java:745)
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:474) 
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.reinitializeCodec(MediaCodecRenderer.java:1261) 
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1111) 
        at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:552) 
        at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:647) 
        at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:536) 
        at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:303) 
        at android.os.Handler.dispatchMessage(Handler.java:101) 
        at android.os.Looper.loop(Looper.java:164) 
        at android.os.HandlerThread.run(HandlerThread.java:65) 

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
marcbaechingercommented, Mar 6, 2019

Cool! Great to hear you have that sorted. I close this issue. Please reopen if you think we can ad something.

1reaction
marcbaechingercommented, Feb 26, 2019

Thanks for the bugreport. When looking into it I found these lines just before the exception:

17:19:18.310 media  2676  1766 I ResourceManagerService: ResourceManagerService checkCodecCapacity pid 20056 clientId 3476169120 useExtended 0 
02-22 17:19:18.310 media  2676  1766 I ResourceManagerService: fail to checkCodecCapacity ( res 2073600, remained 1935360, extended 0 )
02-22 17:19:18.310 10663 20056 20693 I MediaCodec: failed to configure codec bacause of codec capacity

It seems like the codec is running out of capacity. It’s not obvious what the reason is. I searched our internal codebase and haven’t found that error message (the word ‘bacause’ would be pretty obvious). So this message comes from the OEM implementation.

Codecs are shared resources on a device, so it might be that another app does compete at that moment. You are saying that you are capturing and encoding the video from the camera. So as a wild guess it may be that some resources are not yet completely freed on encoding side.

You can try verifying my guesses by making sure that you have freed all resources after capturing, make sure you are not allocating codec resources in other ways (like with a second player) or using a video which needs less resources (downsized) to see if my theory holds somehow.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ExoPlaybackException: Source error · Issue #8586 - GitHub
Play the video with the exoplayer demo app. If the error is not reproduced, then this is indicates there might be something in...
Read more >
Unable to catch ExoPlaybackException: Source error
This is my "onPlayerError" method, but it does not seem to be called for some reason. private class PlayerEventListener implements Player.
Read more >
Troubleshooting - ExoPlayer
There are two possible causes of this failure. The most common cause is that you're trying to play DASH (mpd), HLS (m3u8) or...
Read more >
com.google.android.exoplayer2.ExoPlaybackException java ...
origin: google/ExoPlayer ... @Override public void onPlayerError(ExoPlaybackException error) ... Thrown when a non-recoverable playback failure occurs.
Read more >
How can I reset the exoplayer while playing encountered an ...
google.android.exoplayer2.upstream.exoplayer HttpDataSource$HttpDataSourceException: Unable to connect to https... and I can catch the error in ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found