better_player or exoplayer throwing exception OMX.MTK.VIDEO.DECODER.AVC

1,526

Keep in mind that most devices can have a limited number of decoder instances at the same time. So, maybe you reached that limit. Also check that your app has released successfully any old exoplayer instances before creating new ones.

Moreover, a device may not support the resolution of your media. For this case, you may try to reencode your media files in one of these supported media formats.

Share:
1,526
Lutaaya Huzaifah Idris
Author by

Lutaaya Huzaifah Idris

I am Lutaaya Huzaifah Idris , a Core Experienced Mobile developer , I graduated at Islamic University in Uganda while offering Bachelors of Science in Computer Science. I love to keep the code in the air. If you need any mobile software just send me a hello and we communicate.

Updated on December 26, 2022

Comments

  • Lutaaya Huzaifah Idris
    Lutaaya Huzaifah Idris over 1 year

    I am having an issue on the better_player, where some devices aren't streaming a live link because of this exception:

    Caused by: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.MTK.VIDEO.DECODER.AVC, Format(0, null, null, video/avc, avc1.4D4028, -1, null, [320, 180, -1.0], [-1, -1])
    E/ExoPlayerImplInternal(14168):       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:867)
    E/ExoPlayerImplInternal(14168):       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:561)
    E/ExoPlayerImplInternal(14168):       ... 9 more
    E/ExoPlayerImplInternal(14168):   Caused by: android.media.MediaCodec$CodecException: Failed to initialize OMX.MTK.VIDEO.DECODER.AVC, error 0xfffffff4
    E/ExoPlayerImplInternal(14168):       at android.media.MediaCodec.native_setup(Native Method)
    E/ExoPlayerImplInternal(14168):       at android.media.MediaCodec.<init>(MediaCodec.java:1811)
    E/ExoPlayerImplInternal(14168):       at android.media.MediaCodec.createByCodecName(MediaCodec.java:1792)
    E/ExoPlayerImplInternal(14168):       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.initCodec(MediaCodecRenderer.java:925)
    E/ExoPlayerImplInternal(14168):       at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:860)
    E/ExoPlayerImplInternal(14168):       ... 10 more
    

    this seems to be coming from ExoPlayer, but how to solve this?

    • Thanasis M
      Thanasis M over 3 years
      Please provide us as much info as you can about when this error occurs. Also, in which specific devices does this happen?
    • Lutaaya Huzaifah Idris
      Lutaaya Huzaifah Idris over 3 years
      It happend on techno spark 3 @ThanasisM
  • Lutaaya Huzaifah Idris
    Lutaaya Huzaifah Idris over 3 years
    I think it could be the device not supporting the media format, because I am having one instance since , I just click on th TV and then it plays.
  • Lutaaya Huzaifah Idris
    Lutaaya Huzaifah Idris over 3 years
    Maybe I wold like to ask the stream am using ends with .m3u8 , I didn't see it on the list, is there a possibility of this device failing to stream with this link ?
  • Thanasis M
    Thanasis M over 3 years
    Yeah, if this error occurs on some specific device it's most probable that it is relevant to its specs and hardware. That's why you should do more tests in other devices of different resolutions, brands etc. Good observation about the stream. Since it is not included in Google's official documentation, even if it works I wouldn't feel safe about it. So, it's better to stick to the official doc as closely as you can.
  • Lutaaya Huzaifah Idris
    Lutaaya Huzaifah Idris over 3 years
    Thank you so much @Thanasis, let me try using other links