[Bug] Decoder initialization failed
Checklist
- [x] I make sure that the issue is NOT a duplicate of pinned issues
- [x] I make sure I am using the LATEST version - check here
- [x] I understand that issues with limited impact, such as those occurring on specific devices or under specific network conditions, will not be fixed
- [x] I have attached the error report in the issue
Describe the bug
Error pops up while watching video, after which it will appear when attempting to view any video after that. When attempting to watch them, the error will pop up and the video cannot be played. The report is attached.
Frequency
Always (100% of the time)
Device
Galaxy A15, Android 15
Steps to reproduce the bug
- Open the newest version of PipePipe
- Tap on any video.
- The error will appear.
Additional context
Exception
- User Action: play stream
- Request: Player error[type=ERROR_CODE_DECODING_FAILED] occurred while playing https://www.youtube.com/watch?v=VVggsGZSaYE
- Content Country: US
- Content Language: en-US
- App Language: en_US
- Service: YouTube (Anonymous)
- Version: 4.6.1
- OS: Linux Android 15 - 35
Crash log
com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(298, null, null, video/avc, avc1.4D4020, 554715, null, [1280, 720, 60.0], [-1, -1]), format_supported=YES
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:578)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loopOnce(Looper.java:257)
at android.os.Looper.loop(Looper.java:342)
at android.os.HandlerThread.run(HandlerThread.java:85)
Caused by: com.google.android.exoplayer2.video.MediaCodecVideoDecoderException: Decoder failed: c2.mtk.avc.decoder
at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.createDecoderException(MediaCodecVideoRenderer.java:1639)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:803)
at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1007)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:502)
... 4 more
Caused by: java.lang.IllegalStateException:
at android.media.MediaCodec.native_queueInputBuffer(Native Method)
at android.media.MediaCodec.queueInputBuffer(MediaCodec.java:2958)
at com.google.android.exoplayer2.mediacodec.AsynchronousMediaCodecBufferEnqueuer.doQueueInputBuffer(AsynchronousMediaCodecBufferEnqueuer.java:227)
at com.google.android.exoplayer2.mediacodec.AsynchronousMediaCodecBufferEnqueuer.doHandleMessage(AsynchronousMediaCodecBufferEnqueuer.java:200)
at com.google.android.exoplayer2.mediacodec.AsynchronousMediaCodecBufferEnqueuer.access$000(AsynchronousMediaCodecBufferEnqueuer.java:47)
at com.google.android.exoplayer2.mediacodec.AsynchronousMediaCodecBufferEnqueuer$1.handleMessage(AsynchronousMediaCodecBufferEnqueuer.java:96)
at android.os.Handler.dispatchMessage(Handler.java:107)
... 3 more
It's a hardware issue. Enable VP9 or AV1 from Settings > Enable Advanced formats, and select these formats when playing. Let me know if it doesn't help.
How do I do this? It seems like I cannot play any video at all, it's happened before and I do not know what causes it. I do not have the option to enable these formats within my phone's settings
Whoops. It is not fixed yet.
It's in the app's settings, on the main page, open the left drawer and you'll see it. Settings > Player > Enable Advanced formats > VP9
Close since the issue is likely solved. if not feel free to reopen it.
Issue still occurs, I have to go back to these settings and open and close the menu.
So using VP9 still doesn't solve the issue? Can you paste a new error report?
Got this error message in the background as a notification while using other apps and I don't know why. Video still seems to play when I want it to?
Exception
- User Action: play stream
- Request: Player error[type=ERROR_CODE_DECODING_FAILED] occurred while playing https://www.youtube.com/watch?v=IPMJiM2d9Rc
- Content Country: AU
- Content Language: en-AU
- App Language: en_AU
- Service: YouTube (Logged in)
- Version: 4.7.2
- OS: Linux samsung/r8qxxx/r8q:13/TP1A.220624.014/G781BXXU7HWH5:user/release-keys 13 - 33
Crash log
com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(248, null, null, video/x-vnd.on2.vp9, vp9, 3378048, en, [1920, 1080, 24.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.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: com.google.android.exoplayer2.video.MediaCodecVideoDecoderException: Decoder failed: OMX.qcom.video.decoder.vp9
at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.createDecoderException(MediaCodecVideoRenderer.java:1639)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:803)
at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1007)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:502)
... 4 more
Caused by: android.media.MediaCodec$CodecException: Error 0xffffffe0
Also frequently get this issue - since LogFox caught a crash of a seperate application at the same time and this is tagged "need more info" i decided to post this here:
Device: Galaxy A16 5G (low-end 2024-10)
Exception
- User Action: play stream
- Request: Player error[type=ERROR_CODE_DECODING_FAILED] occurred while playing https://www.youtube.com/watch?v=RqfUd5AifHo
- Content Country:
- Content Language: en
- App Language: en
- Service: YouTube (Anonymous)
- Version: 4.7.2
- OS: Linux samsung/a16xeea/a16x:15/AP3A.240905.015.A2/A166BXXU3BYF1:user/release-keys 15 - 35
Crash log
com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(247, null, null, video/x-vnd.on2.vp9, vp9, 1841196, en, [1280, 720, 24.0], [-1, -1]), format_supported=YES
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:578)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loopOnce(Looper.java:257)
at android.os.Looper.loop(Looper.java:342)
at android.os.HandlerThread.run(HandlerThread.java:85)
Caused by: com.google.android.exoplayer2.video.MediaCodecVideoDecoderException: Decoder failed: c2.android.vp9.decoder
at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.createDecoderException(MediaCodecVideoRenderer.java:1639)
at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:803)
at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1007)
at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:502)
... 4 more
Caused by: android.media.MediaCodec$CodecException: Error 0xffffffe0
Other Crash (as reported by LogFox)
App "name": unknown (media.swcodec)
Log
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/a16xeea/a16x:15/AP3A.240905.015.A2/A166BXXS4BYG1:user/release-keys'
Revision: '6'
ABI: 'arm64'
Processor: '-1'
Timestamp: 2025-09-24 17:17:49.177740211+0200
Process uptime: 1508496s
Cmdline: media.swcodec oid.media.swcodec/bin/mediaswcodec
pid: 19380, tid: 6909, name: oid.vp9.decoder >>> media.swcodec <<<
uid: 1046
tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr --------
x0 0000007ea9536000 x1 b400007ea91dfcc0 x2 0000000000000500 x3 0000007ea9536000
x4 b400007ea91e01c0 x5 0000007ea9536500 x6 0000000000000540 x7 00000000000002a0
x8 0000000000000000 x9 00000000000002d0 x10 00000000000002d0 x11 00000000000002d0
x12 0000000000000500 x13 0000000000000000 x14 0000000000000000 x15 0000000000000000
x16 0000007ee27f8698 x17 0000007f77ad7a40 x18 0000007e9ec7c000 x19 0000007ea964f400
x20 0000007ea9617000 x21 0000000000000500 x22 b400007ea92d92b0 x23 b400007ea93197b0
x24 0000000000000500 x25 0000000000000540 x26 b400007ea91dfcc0 x27 0000007ea9536000
x28 00000000000002d0 x29 0000007ed0cc4300
lr 0000007ee27857d8 sp 0000007ed0cc42e0 pc 0000007f77ad7b38 pst 0000000020001000
13 total frames
backtrace:
#00 pc 000000000008eb38 /apex/com.android.runtime/lib64/bionic/libc.so (__memcpy_aarch64_simd+248) (BuildId: b87a5d2aa8f7cceb136d981253a92001)
#01 pc 000000000002c7d4 /apex/com.android.media.swcodec/lib64/libcodec2_soft_common.so (android::convertYUV420Planar8ToYV12(unsigned char*, unsigned char*, unsigned char*, unsigned char const*, unsigned char const*, unsigned char const*, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned int, unsigned int, bool) (.cfi)+108) (BuildId: 31360ba3c1607048029528c21473c18a)
#02 pc 000000000000e278 /apex/com.android.media.swcodec/lib64/libcodec2_soft_vp9dec.so (android::C2SoftVpxDec::outputBuffer(std::__1::shared_ptr<C2BlockPool> const&, std::__1::unique_ptr<C2Work, std::__1::default_delete<C2Work>> const&)+2316) (BuildId: b95d688a2951cda58a06a13fc007b7d0)
#03 pc 000000000000d614 /apex/com.android.media.swcodec/lib64/libcodec2_soft_vp9dec.so (android::C2SoftVpxDec::process(std::__1::unique_ptr<C2Work, std::__1::default_delete<C2Work>> const&, std::__1::shared_ptr<C2BlockPool> const&)+1644) (BuildId: b95d688a2951cda58a06a13fc007b7d0)
#04 pc 0000000000031524 /apex/com.android.media.swcodec/lib64/libcodec2_soft_common.so (android::SimpleC2Component::processQueue()+1392) (BuildId: 31360ba3c1607048029528c21473c18a)
#05 pc 0000000000030d30 /apex/com.android.media.swcodec/lib64/libcodec2_soft_common.so (android::SimpleC2Component::WorkHandler::onMessageReceived(android::sp<android::AMessage> const&)+708) (BuildId: 31360ba3c1607048029528c21473c18a)
#06 pc 000000000001c59c /apex/com.android.media.swcodec/lib64/libstagefright_foundation.so (android::AHandler::deliverMessage(android::sp<android::AMessage> const&)+184) (BuildId: 848e4e858353fdbc33cf1c5afca5b87a)
#07 pc 000000000002364c /apex/com.android.media.swcodec/lib64/libstagefright_foundation.so (android::AMessage::deliver()+172) (BuildId: 848e4e858353fdbc33cf1c5afca5b87a)
#08 pc 000000000001da98 /apex/com.android.media.swcodec/lib64/libstagefright_foundation.so (android::ALooper::loop()+536) (BuildId: 848e4e858353fdbc33cf1c5afca5b87a)
#09 pc 000000000001956c /apex/com.android.media.swcodec/lib64/libutils.so (android::Thread::_threadLoop(void*)+252) (BuildId: 30039ef0f9a7d6a3c9f0b5d4aa80f50c)
#10 pc 000000000001b49c /apex/com.android.media.swcodec/lib64/libutils.so (libutil_thread_trampoline(void*) (.__uniq.226528677032898775202282855395389835431)+20) (BuildId: 30039ef0f9a7d6a3c9f0b5d4aa80f50c)
#11 pc 00000000000a4d38 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+196) (BuildId: b87a5d2aa8f7cceb136d981253a92001)
#12 pc 0000000000097d34 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: b87a5d2aa8f7cceb136d981253a92001)
Enable VP9 or AV1
i haven't changed Enable Advanced Formats - so its still VP9 + HEVC.
if that is the issue it might be good to have working default settings.
mpv and findroid can both play AV1 no problem, seal downloads yt-dlp av1 no problem, etc
In 5.0.0 we migrate to modern media3, and it likely solves the issue :)