Hi folks.
I’m trying to handle moonlight-embedded with Sunshine server.
I compiled that with the @joakim_s recomendations and works perfec streaming 4k. However, the Luna script fails when I try to enter on any of the applications that Sunshine serves.
You need to take a look at the log. Also my suggestion is to redirect all moonlight logs into separate file to make debugging easier, like so for launch.sh:
Searching for server...
Connecting to XXX.XXX.XXX.XXX...
I’m using a Vero 4K+ and I have OSMC 2023.12-1, with Kodi 20
On kodi.log i can see this when launching the script:
2024-01-04 18:03:44.845 T:6621 error <CSettingGroup>: unable to create new setting "last_run"
2024-01-04 18:03:44.845 T:6621 error <CSettingGroup>: unknown setting type "hidden" of "launchscript_conf"
2024-01-04 18:03:44.845 T:6621 error <CSettingGroup>: unable to create new setting "launchscript_conf"
2024-01-04 18:03:46.771 T:6627 info <general>: Moonlight binary could not be found. Configuration file saved at /home/osmc/.kodi/addons/script.luna/
2024-01-04 18:03:46.774 T:6627 error <CSettingGroup>: unknown setting type "hidden" of "addon_version"
2024-01-04 18:03:46.774 T:6627 error <CSettingGroup>: unable to create new setting "addon_version"
2024-01-04 18:03:46.774 T:6627 error <CSettingGroup>: unknown setting type "hidden" of "last_run"
2024-01-04 18:03:46.774 T:6627 error <CSettingGroup>: unable to create new setting "last_run"
2024-01-04 18:03:46.774 T:6627 error <CSettingGroup>: unknown setting type "hidden" of "launchscript_conf"
2024-01-04 18:03:46.774 T:6627 error <CSettingGroup>: unable to create new setting "launchscript_conf"
2024-01-04 18:04:48.005 T:6539 info <general>: CActiveAESink::OpenSink - initialize sink
2024-01-04 18:04:48.005 T:6539 info <general>: CAESinkALSA::Initialize - Requested layout FL, FR
2024-01-04 18:04:48.006 T:6539 info <general>: CAESinkALSA::Initialize - set digital codec 0
2024-01-04 18:04:48.006 T:6539 info <general>: CAESinkALSA::Initialize - Attempting to open device "default"
2024-01-04 18:04:48.017 T:6539 info <general>: CAESinkALSA::Initialize - Opened device "default"
2024-01-04 18:04:48.019 T:6539 info <general>: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2024-01-04 18:04:48.020 T:6539 info <general>: CAESinkALSA::InitializeHW - Using data format AE_FMT_S24NE4
2024-01-04 18:04:48.024 T:6539 info <general>: CAESinkALSA::Initialize - speaker layout 0
2024-01-04 18:04:50.968 T:6635 info <general>: Moonlight binary could not be found. Configuration file saved at /home/osmc/.kodi/addons/script.luna/
2024-01-04 18:04:50.970 T:6635 error <CSettingGroup>: unknown setting type "hidden" of "addon_version"
2024-01-04 18:04:50.970 T:6635 error <CSettingGroup>: unable to create new setting "addon_version"
2024-01-04 18:04:50.970 T:6635 error <CSettingGroup>: unknown setting type "hidden" of "last_run"
2024-01-04 18:04:50.970 T:6635 error <CSettingGroup>: unable to create new setting "last_run"
2024-01-04 18:04:50.970 T:6635 error <CSettingGroup>: unknown setting type "hidden" of "launchscript_conf"
2024-01-04 18:04:50.970 T:6635 error <CSettingGroup>: unable to create new setting "launchscript_conf"
2024-01-04 18:04:53.075 T:6520 warning <general>: CGUIWindowManager - HandleAction - ignoring action 7, because topmost modal dialog closing animation is running
2024-01-04 18:04:53.298 T:6635 error <CSettingGroup>: unknown setting type "hidden" of "addon_version"
2024-01-04 18:04:53.298 T:6635 error <CSettingGroup>: unable to create new setting "addon_version"
2024-01-04 18:04:53.298 T:6635 error <CSettingGroup>: unknown setting type "hidden" of "last_run"
2024-01-04 18:04:53.299 T:6635 error <CSettingGroup>: unable to create new setting "last_run"
2024-01-04 18:04:53.299 T:6635 error <CSettingGroup>: unknown setting type "hidden" of "launchscript_conf"
2024-01-04 18:04:53.299 T:6635 error <CSettingGroup>: unable to create new setting "launchscript_conf"
2024-01-04 18:04:53.400 T:6538 warning <general>: CActiveAE::StateMachine - signal: 0 from port: OutputControlPort not handled for state: 7
2024-01-04 18:04:58.400 T:6635 error <general>: ActiveAE::Resume - failed to init
2024-01-04 18:05:07.285 T:6539 info <general>: CActiveAESink::OpenSink - initialize sink
2024-01-04 18:05:07.285 T:6539 info <general>: CAESinkALSA::Initialize - Requested layout FL, FR
2024-01-04 18:05:07.285 T:6539 info <general>: CAESinkALSA::Initialize - set digital codec 0
2024-01-04 18:05:07.285 T:6539 info <general>: CAESinkALSA::Initialize - Attempting to open device "default"
2024-01-04 18:05:07.292 T:6539 info <general>: CAESinkALSA::Initialize - Opened device "default"
2024-01-04 18:05:07.292 T:6539 info <general>: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2024-01-04 18:05:07.293 T:6539 info <general>: CAESinkALSA::InitializeHW - Using data format AE_FMT_S24NE4
2024-01-04 18:05:07.295 T:6539 info <general>: CAESinkALSA::Initialize - speaker layout 0
2024-01-04 18:05:07.817 T:6650 info <general>: Moonlight binary could not be found. Configuration file saved at /home/osmc/.kodi/addons/script.luna/
2024-01-04 18:05:07.820 T:6650 error <CSettingGroup>: unknown setting type "hidden" of "addon_version"
2024-01-04 18:05:07.820 T:6650 error <CSettingGroup>: unable to create new setting "addon_version"
2024-01-04 18:05:07.821 T:6650 error <CSettingGroup>: unknown setting type "hidden" of "last_run"
2024-01-04 18:05:07.821 T:6650 error <CSettingGroup>: unable to create new setting "last_run"
2024-01-04 18:05:07.821 T:6650 error <CSettingGroup>: unknown setting type "hidden" of "launchscript_conf"
2024-01-04 18:05:07.821 T:6650 error <CSettingGroup>: unable to create new setting "launchscript_conf"
I’ve modified the script a little, the result is the same as in the default command:
I’m unsure if Luna, un modified for OSMC, will be able to run. Since mediacenter is restared as soon as kodi.bin dies, I guess that Luna script will probably have a hard time.
On another note, seems like there has been some regression somewhere. Used to have it working on my Vero4k, but I cant get picture any more, i can hear the audio stream and my controller effects the gameserver. But in short, getting the video stream to display is still a small cunandrum. Working on it when I have some spare time.
But what used to work for me, was ssh in and run something liek this:
sudo sysemctl stop mediacenter : pskill -9 kodi-bin
Then start moonlight from ssh session.
But as of a while back, you can get audio and controls to stream, but video is still a bit of a humbug for me…
Ok, I’m thinking about creating some shortcuts from kodi interface to start moonlight. How can we do it from kodi? Which commands should I use?
There is another script adapted to OSMC for this purpose?
They way I solved this issues before(my addons “root console on TV” and “X-windows with chrome”),
I make Kodi start a bash script, that opens another another bash script, in virtual terminal and switches to that VT.Mean while the first script shutsdown mediacenter process and then hard kill kodi.bin and waits for return of the virtual terminal and restarts mediacenter process again.
Now it’s been a few years since I ripped this launch technique from the original RetrOSMC, which launched Retropie on a Pi2, running Osmc. I’ll gladly guide you through the process, but we should perhaps do it in PM instead of a public thread. I myself haven’t looked at those scripts for almost 5 months.
You’ll find links to the X-windows installer, here on the forum. The installer isn’t that special, but it copys the zip containing launcher addon and a the other folder needed for the nested bash scripts., this was done while I hardly knew how addons were supposed to be packaged.
@tomasdeltell feel free to PM me, if you have any questions. Mean while I will start to focus on getting Moonlight-embedded running again on both 4k(+) and V.