[Unofficial] moonlight-embedded

@luizkun Since updating from coreelec 19.3 to 19.4 the kernel was updated to 4.9.269 which changed some parameters in initializing the codec.

You can check out the commits here:

It has been updated based on Kodi’s decode parameters. So you will not be able to use version 144 on 19.3 and you cannot use 130 on 19.4. This has introduced the blackscreen issue which I have yet to figure out what is causing it, as moonlight is supposed to run the blank command.

When it comes to input, this is still a problem because Kodi is running in the background and has full control of the input devices. If I were to kill Kodi then it would be a lot slower to return back to it, but it would fix all blackscreen, input, audio issues.

Hi @smg04 thanks for your change log , can you guide me how to build this moonlight-embedded for coreelec ? I can help you debug this issue

Build steps

  1. Set up a Linux environment (I use Ubuntu 18.04 on WSL)
  2. Download CoreELEC repo (or use git clone). You need to match your coreelec version (coreelec-19 for matrix or coreelec-20 for nexus)
  3. Use scripts/checkdeps to download all dependencies (if it doesn’t work, you have to sudo apt update).
  4. Build addon using scripts/create_addon script.luna. This will only build the addon, not the whole CoreELEC image.
  5. Folder target will contain the built zip file for installation.

The addon config is located in packages/addons/script/luna/package.mk and moonlight-embedded config is located in packages/addons/addon-depends/moonlight-embedded/package.mk.

1 Like

Thank you very muh smg04, i will try your guide after my business trip , i will let you know soon when i find something

script.luna.1.44_modded.zip (2.7 MB)
Hi @smg04 @Adam86 i create luizkun_script as a simple workaround script to fix black screen issue and controller issue .
Please try it

@luizkun will try it in the next hour!

What launch script do you recommend to use?

EDIT: just tried it with the luizkun launch script and now the stream starts absolutely fine which is fantastic. The only thing that is still an issue is my controller doesn’t work in Kodi still until I reboot.

Great work though :slight_smile:

Continuing the discussion from [Unofficial] moonlight-embedded:

Hi Adam, you should try different usb port , and i suggest using 2.0 USB port for controller , i see that USB 3.0 controller driver does not support gamepad well , my device X96Air P3 has usb 3.0 port also have that issue while USB 2.0 port work normally .

@luizkun, OK I checked and the Xbox Wireless USB Dongle was plugged into the side USB 2.0 port, so I swapped this to the rear one and tested Moonlight again and when ending the stream the controller continued to work this time :slight_smile:

So looking really good now I’d say, cheers for your efforts.

This is working great for me too!

Thanks a lot @luizkun and @smg04 for your work on this

@luizkun, been meaning to ask you, is there a way to stop Moonlight from prompting which launchscript it is using when you launch a stream?

It should ask you to select a launch script only when you are first time running the script or have upgraded to a new version… Once you select it, it should never ask you again (until you update again).

Hi @smg04, sorry the build @luizkun has done which resolves the black screen is slightly different in that when a stream is launched it tells you which launchscript it is using and you have to press OK. So was just wondering if it could be disabled you see.

script.luna.1.44_modded_2.zip (2.7 MB)
please try it

Hi smg04 , can you work with me to integrate moonlight qt to
coreelec, with moonlight qt i see that there is vsync option, with work very well

It probably couldn’t work because there’s no windowing support in CoreELEC. So you would have to customize Qt for embedded with all amlogic drivers. Otherwise, you could maybe use software rendering but that would not be as efficient or well performing as this version is.

Hi smg04, can we use below package as Qt library for coreelec ?

Has anyone tried Luna with Radxa Zero? I am unable to pair to my host, but I have used Moonlight before with this device on android, so it has to work. Pairing is like it is not even trying. There is internet, there is network, because samba is working, so I don’t know why I can’t pair.

@smg04 there is new version of moonlight-embedded 2.5.3, can we expect new compilation? :smiley:

script.luna-1.1.1-matrix.144.zip (2.7 MB)

This is built with v2.5.3 but I haven’t tested it. Lemme know if something’s wrong… Is there anything significant in the update? Looks like there’s nothing new, maybe some bug fixes?

First of all, thank you for your effort.

I am using coreelec 19.5-Matrix_rc2 on Odroid N2 Plus.
I have tried installing and using various versions of moonlight, but a black screen is displayed and it is not resolved.

The version I used is:
smg04)
script.luna-1.1.1-matrix.143.zip (9 Jan)
script.luna-1.1.1-matrix.144.zip (2 Apr)

luizkun)
script.luna.1.44_modded.zip (22 Jul)
script.luna.1.44_modded_2.zip (6 Aug)

kodi repo)
143 version

Please help me how to solve it.