Kodi Community Forum

Full Version: ExoPlayer decoding backend on Kodi
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
I'm running Kodi on MiBox S and as I can see Kodi only uses MediaCodec api for HW decoding. Well, must say MediaCodec implementation on MiBox is a piece of sh*t - I am getting playback choppy, not smooth and frame loss. And I actually can do nothing with that.

As I know I need to blame Xiaomi for poor implementation, ExoPlayer, which is used by Netflix, YouTube and most Android TV apps still works perfectly fine, with decent picture quality

Is there any way to force Kodi to use ExoPlayer api? If not, Kodi is useless on MiBox, which is actually bad news. Can anyobody confirm? I like to use Kodi, but that prevents me from doing it...
Yes. There is. You just need to implement DVDPlayerVideo and DVDPlayerAudio as well as DVDPlayer Interface and here you go.
You mean that's need to be implemented, hasn't it been considered for official Kodi Android? May I propose it as improvement?

Even if I could do what you said, I will need to fork official Kodi and make my own build
Kodi uses the same player on all the systems it supports - these are many. Exxoplayer only runs on exactly one - so: no.

If you want that, you need to fork it.
Ok, so Kodi won't work on MiBox, as MediaCodec support on MiBox actually does not exists. From my experience, very few Android apps use MediaCodec on Android though. Netflix, YouTube, Google Play Movies, Amazon, HBO Go, Showmax, all local vod providers in my country, none of them use MediaCodec and all of them have no problems on MiBox.

Shame you have chosen MediaCodec (from many others), but ok I get it. My suggestion is to notify MiBox problems/incompatibility in faq/kodi wiki then
Shame? 

Which Codec is the official Android codec again? Could you show us?
That is real mess. None of them is mentioned as official, but as I can see, Google and all AndroidTv apps use ExoPlayer api directly.

I don't know any mainstream VOD app for Android TV app that use MediaCodec api. Of course that does not mean using MediaCodec is some kind of mistake, but Kodi is currently probably the only app that use MediaCodec on AndroidTv. This is przez probably reason why Xiaomi does not even care to support MediaCodec properly, which sadly makes Kodi unusable on MiBox so far.

Yes, I know you are not going to change that only because Xiaomi is lazy, and I can understand that. But please let me to articulate my disappointment about this situation, because MiBox is actually the only reasonable choice as AndroidTV box (Shield is an expensive overkill, as it's intended for gaming actually)
ExoPlayer is built around MediaCodec, according to docs: https://developer.android.com/guide/topi.../exoplayer

But ExoPlayer works without any issues on MiBox, while Kodi's MediaCodec implementation has serious issues. I am confused. Btw, ExoPlayer should be easier to use (as it's intended to simplify low lewel MediaCodec api calls and provide more friendly api), why own MediaCodec implementation instead? (which seems to have issues in this case). And ExoPlayer also supports some things not yet implented in Kodi

Maybe you cold look at your implementation to determine why does not it work the same
(2020-03-01, 18:48)giaur Wrote: [ -> ]I'm running Kodi on MiBox S and as I can see Kodi only uses MediaCodec api for HW decoding. Well, must say MediaCodec implementation on MiBox is a piece of sh*t - I am getting playback choppy, not smooth and frame loss. And I actually can do nothing with that.

Is Kodi auto Frame Rate Matching / Refresh switching enabled ?

Using what content exactly at what Resolution and Bitrate ?



Know issues with AMLogic Android Firmware using a v4.9 (and earlier) Kernel in combo with Kodi Krypton onwards - Mediacodec:

Playback problems with old:
- VC1/h.264
- mpeg4 & Xvid

Plus deinterlacing is not working properly for old interlaced DVD & Broadcast OTA TV content, results in:
- half motion deinterlacing of h.264 and mpeg2 streams
- blocky mpeg2 picture outputs

You should not be using any AMLogic chipset based Android device if you are a demanding user at ALL.

Notice how all that old redundant encoded stuff is no longer used with mainstream Internet online video streaming services - that is the reason it gets very minimal to no support from AMLogic & it's Android vendors.

Move over to the AMLogic - Linux based CoreELEC Kodi Leia that still uses AMcodec video decoding and everything works (it's had a LOT of custom work done)
@wrxtasy

Let mi summarize it:
- ExoPlayer - it uses low lowel MediaCodec api to perform hardware decoding. No problems on AmLogic, Snapdragon and even MTK chipsets
- Kodi - it uses its own MediaCodec api calls. Problems everywhere except Snapdragon

Conclusion: you dit it wrong. Right? It may look unfair, but what other conclusion can be? Note that ExoPlayer is open source haven't you reinvented the wheel? I suspect either you did something wrong or you use some old/Snapdragorn specific api etc. In any case, your approach gives worse results overall.

If I could suggest anything, you can maybe look into ExoPlayer sources to see why does it work so different and look for possibly better implementation. Note that even Google itself apparently uses the same approach, as shown by ExoPlayer, because all Google apps have no problems. So that's probably the best approach on Android currently.
Out of curiosity are we talking about 4k video on the mibox? Because far as 1080p is concerned everything is buttery smooth on my MiBox running Leia.
I'm talking about dvb-s 1080i actually. But I can see degradation of any video watched on Kodi. That's weird, but 4k uhd dvb-s seems to be fine. If you can't see difference, my guess is your tv performs some kind of posprocessing.
Got it. Had no clue you were actually talking about Live TV until now, hence the question. My aforementioned observations refer to local and/or LAN hosted files and NetFlix/YouTube. Apologies for the interruption.
That does not matter. Local videos are degredated the same way. 1080p or 1080i, h264. That's not about something is not supported, that's supported but huge frame loss happens. Netflix/Youtube is fine, unless they are played in Kodi.
Pages: 1 2 3 4 5