Can't play the video due to ERROR CODE DECODER INIT FAILED
Checklist
- [x] I am able to reproduce the bug with the latest version given here: CLICK THIS LINK.
- [x] I made sure that there are no existing issues - open or closed - which I could contribute my information to.
- [x] I have read the FAQ and my problem isn't listed.
- [x] I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
- [x] This issue contains only one bug.
- [x] I have read and understood the contribution guidelines.
Affected version
0.27.6
Steps to reproduce the bug
Exception
- User Action: play stream
- Request: Player error[type=ERROR_CODE_DECODER_INIT_FAILED] occurred while playing https://www.youtube.com/watch?v=tobJic6YVsA
- Content Country: US
- Content Language: en-US
- App Language: en_US
- Service: YouTube
- Timestamp: 2025-04-26T14:18:16.219+06:00
- Package: org.schabi.newpipe
- Service: YouTube
- Version: 0.27.6
- OS: Linux samsung/gtoxx/gto:11/RP1A.200720.012/T295XXU5CWC3:user/release-keys 11 - 30
Crash log
com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(299, null, null, video/avc, avc1.64002A, 3594232, null, [1080, 1920, 60.0], [-1, -1]), format_supported=YES
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:578)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:246)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.qcom.video.decoder.avc, Format(299, null, null, video/avc, avc1.64002A, 3594232, null, [1080, 1920, 60.0], [-1, -1])
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:1021)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecOrBypass(MediaCodecRenderer.java:537)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1453)
at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:917)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.readSourceOmittingSampleData(MediaCodecRenderer.java:954)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:769)
at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1007)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:502)
... 3 more
Caused by: android.media.MediaCodec$CodecException: Error 0xfffffff4
at android.media.MediaCodec.native_configure(Native Method)
at android.media.MediaCodec.configure(MediaCodec.java:2127)
at android.media.MediaCodec.configure(MediaCodec.java:2043)
at com.google.android.exoplayer2.mediacodec.SynchronousMediaCodecAdapter$Factory.createAdapter(SynchronousMediaCodecAdapter.java:51)
at com.google.android.exoplayer2.mediacodec.DefaultMediaCodecAdapterFactory.createAdapter(DefaultMediaCodecAdapterFactory.java:113)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodec(MediaCodecRenderer.java:1099)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:1010)
... 10 more
Expected behavior
No response
Actual behavior
No response
Screenshots/Screen recordings
No response
Logs
No response
Affected Android/Custom ROM version
No response
Affected device model
No response
Additional information
No response
Please fill the issue template section fully with the resolution on which this error occured & your device info with its ROM/ android version.
EDITED:
Please restart the app each time you change a setting when trying the following steps.
-
Try enabling the 3 toggles one by one under Video and audio > Exoplayer settings. Specially try enabling "Use ExoPlayer's decoder fallback feature" first (this fixed the decoder failed issue for some users!)
-
if that doesn't work then proceed to try various combos of these toggle.
-
If above methods don't fix the issue then follow all the steps tried here to check whether your device actually supports playing high resolution AVC codec videos.
-
If not then use a lower resolution/codec combo that your device can handle.
Problem is that some devices wrongly claim to support AVC decoding.
I think we need a better error handling if such a problem occurs & mechanism to fallback to lower resolution/codec combo automatically for such devices. After every few days a new issue pops up that describes this or a similar problem related to MediaCodec
Anyway I have updated the above comment with as much info I can gather from the issues to help users in one place in a coordinated way.
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.
@Unofficialhuman do you still experience this issue or has it been resolved for you?
I may not be Unofficialhuman, but I have been experiencing the same issue. The video player was slightly unstable before, but videos would play after one or two attempts, but then some videos became unwachable, and now I am completely unable to watch any video. Updating to 0.28 helped briefly, but now the problem is back again. I have already tried fiddling with all the Exoplayer settings to no avail. In addition, the external player and downloaded videos both give me a "can't play video" error.
Exception
- User Action: play stream
- Request: Player error[type=ERROR_CODE_DECODER_INIT_FAILED] occurred while playing https://www.youtube.com/watch?v=EHd_Y7steVU
- Content Country: US
- Content Language: en-US
- App Language: en_US
- Service: YouTube
- Timestamp: 2025-08-25T16:50:08.051-04:00
- Package: org.schabi.newpipe
- Service: YouTube
- Version: 0.28.0
- OS: Linux Android 7.1.2 - 25
Crash log
com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(135, null, null, video/avc, avc1.4D401F, 123423, null, [854, 480, 30.0], [-1, -1]), format_supported=YES
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:578)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:154)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.qcom.video.decoder.avc, Format(135, null, null, video/avc, avc1.4D401F, 123423, null, [854, 480, 30.0], [-1, -1])
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:1021)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecOrBypass(MediaCodecRenderer.java:537)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1453)
at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:917)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.readSourceOmittingSampleData(MediaCodecRenderer.java:954)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:769)
at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1007)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:502)
... 3 more
Caused by: android.media.MediaCodec$CodecException: Failed to initialize OMX.qcom.video.decoder.avc, error 0xfffffff4
at android.media.MediaCodec.native_setup(Native Method)
at android.media.MediaCodec.<init>(MediaCodec.java:1776)
at android.media.MediaCodec.createByCodecName(MediaCodec.java:1757)
at com.google.android.exoplayer2.mediacodec.SynchronousMediaCodecAdapter$Factory.createCodec(SynchronousMediaCodecAdapter.java:74)
at com.google.android.exoplayer2.mediacodec.SynchronousMediaCodecAdapter$Factory.createAdapter(SynchronousMediaCodecAdapter.java:49)
at com.google.android.exoplayer2.mediacodec.DefaultMediaCodecAdapterFactory.createAdapter(DefaultMediaCodecAdapterFactory.java:113)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodec(MediaCodecRenderer.java:1099)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:1010)
... 10 more
Edit: Rebooting the phone did actually fix the issue, now player errors are back to the normal amount.
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.