Can I choose OMXPlayer or MMAL per add-on?

I’m currently running the testing version of OSMC so that I can use Kodi 18 alpha with native Netflix and Amazon Prime addons. But I’m running into a problem after a fairly recent update (I don’t remember exactly which update this problem began with):

  • If I use MMAL, the playback gets choppy – like the framerate drops below my TV’s normal rate so it doesn’t look smooth, and every once in a while, there is a jitter, like it’s freezing on a frame for a moment.

  • Also, if I use MMAL, my Raspberry Pi 3 begins to overheat (little thermometer symbol appears in the top right corner of the screen).

  • If I use OMX Player, playback is beautifully smooth with no overheating. But, when I try to play something from Netflix or Amazon Prime. Then I get nothing but a green screen.

  • If I try to enable both MMAL and OMX Player, it seems to always default to MMAL for all videos. Or at least it exhibits the same behaviors as using just MMAL.

So, my question is, can I somehow assign which addons use which player? I want most of my addons to use OMX Player, since it plays back perfectly for them. But, for Netflix and Amazon addons, I want to use MMAL, so I can actually watch them, even if playback isn’t perfect. Or, are there other settings that I can try that might make one or the other work with all addons?

Netflix and Amazon are rendered in software: so neither OMXPlayer or MMAL apply.

Sam

Will this be changed in the future or is this impossible?

Hardware decoding isn’t possible for DRM based streams and this won’t change in the future unfortunately.

Well, it seems it does apply, though, in some way. Using OMX Player, Netflix and Amazon won’t work, while they do with MMAL.

No – it will be decoded in software.

MMAL provides an opportunity for VideoPlayer to create an ffmpeg decoding instance, but OMXPlayer does not as it is hardware accelerated only, which is why enabling OMXPlayer doesn’t work at all.

By the time OMXPlayer is used, it’s too late to fall back to a software decoding instance.

I’m just saying that, from a user perspective, how it’s coded is irrelevant if the effect is the same. The effect is what I’m talking about, not whether it’s coded to use either one or not. I’m just asking if there’s a way to use OMX Player for most add-ons (it works the best of the two players for this hardware) but disable it or switch to MMAL when using these two add-ons (whichever needs to happen, since using OMX Player makes the Netflix and Amazon add-ons unusable), so that this effect is no longer an issue.

I see what you are asking now.

Omxplayer will likely soon be deprecated in Kodi so I don’t expect to see much work in this direction

That’s really bad news. MMAL is awful. It makes everything very difficult to watch from the low frame rate and constant gittering, and overheats my RPi 3. OMX Player is far smoother, if they can get it to work well with these couple add-ons. Any chance of convincing them not to do that to us?

It’s not something to worry about until at least Kodi v19.

Sam

Ok, so… Since the Netflix and Amazon add-ons don’t use hardware acceleration anyway, and OMX Player is still usable for the time being, is there a way to prevent the Kodi player from forcing the stream from these add-ons to run through OMX Player when it’s enabled, and just use software encoding for just these and OMX Player for everything else? I just want a stable stream here. This is getting incredibly frustrating that I have to choose between access to my paid services or a steady, watchable stream. There has to be some way to do this, right?

It seems to me that you should be asking these questions on the Kodi forums, as it has nothing to do with OSMC.

I may have been too brief before, but choosing MMAL will always ensure video is deferred to SW when necessary.

If you are dependent on OMX then could you please clarify why? It is likely it will soon be deprecated in Kodi.

Sam

Sam, thank you for your reply. You were not too brief, and I understand that MMAL drops to SW as needed. However, I must use OMX Player at this point. On my Raspberry Pi 3, using MMAL or software rendering results in most videos/streams not playing smoothly. This is more noticeable on some addons than on others, possibly due to the resolution or codecs being used in the video. It becomes very difficult to watch for long periods of time, and tends to overheat my Raspberry Pi, and so we don’t want to use it unless absolutely necessary. OMX Player, however, is beautifully smooth. It just doesn’t play well with the Netflix and Amazon addons. I actually cannot tell the difference between MMAL and software, which makes me wonder if MMAL is actually working properly on my hardware. It behaves like it’s just dropping all streams to software instead of using hardware. This problem has only occurred during the last couple months. I remember that there was an update after which MMAL was no longer smooth. I don’t remember exactly which update that was, though, as the OSMC testing updates come in almost daily.

@bmillham, I think it’s an OSMC problem, because until an OSMC testing update a couple months ago, everything worked fine. I could be wrong, though.

I just realized that you are on the development repos. But if as Sam said the long term plan for Kodi to do away with OMX Player is true, then this will become a Kodi issue :wink:

It won’t be an OSMC problem, as MMAL works quite well for many other users.

v18 however is a little less stable. You may need to hop some builds to find something reasonable. Kodi v18 after all is still in an alpha phase.

There has been more discussion on Slack.

Omxplayer is smooth when moving through GUI when video is playing. Mmal has a lot of stuttering when GUI is displayed. This is on v17.

Can anyone test if this still occurs in v18?

This is exactly what I’ve been saying, except that for me, I’m on Kodi 18 beta and it doesn’t matter if the GUI is displaying or not. OMXPlayer=perfectly smooth playback but you can’t use some add-ons or devices. MMAL=jerky playback, but you can use all add-ons and devices. There’s not currently a fully usable configuration that I can find.