@skupi
Thank you for the info, this is very helpful! I do compile it on another box for now, I do not currently have a setup ready for compiling via CoreELEC build environment.
I will be compiling this in a few hours, but as a safety measure, I always test the binaries before I publish them and I will also be checking all the new commits (there’s been a few) so expect an update today/tomorrow.
Luna not tested, there have been some issues, it might require launching from ssh. Download script.luna w/ moonlight-embedded 2.5.0: script.luna-0.8.0~matrix.110.zip (3.2 MB)
There is now added support for 7.1 surround, that one should work on amlogic devices. 5.1 not tested, but currently won’t fix.
I am currently working on some improvements in the binary… Found something useful this time.
I DID IT! WOOOOO!
moonlight-embedded is now using almost the same code as Kodi for handling frames. There are no kernel crashes, most of the issues have been fixed (when it comes to video display). The latency is minimal, hoping all stuttering is gone now too!!
Please, test out this release, it’s very important to me! Especially people with older hardware (like S905) that uses the old kernel, this release might not work for you…
If you could also test surround sound, that would be VERY helpful.
All help is appreciated, thank you!
script.luna v0.8.2-matrix
For install, all you have to do is install the ZIP from Kodi and go through setup with your IP and wanted moonlight configuration (bitrate, resolution, etc.)
fast test i just update plugin, streaming is great i feel difference but i still get periodic stuttering. I will try tomorrow reinstall plugin or try other things.
i saw on version 0.8.0 that alternative method is using below 1536 packet size its true? in new version i dont see that information in log.
Will be nice if CE team will update xpadneo drivers for game pads to newest version.
@skupi The alternative method is now default and there are no other ways to send frames. This one seems fast enough.
It would be nice if you could PM me a video of the exact stuttering, cause maybe I just don’t notice it? I can try assembling something but I don’t really think there’s much left to do.
Make sure you deleted /storage/moonlight and try uninstalling and installing the addon, just in case somehow it’s taking the wrong binaries.
tomorrow i will test other things, reinstall addons, restart box other thinks on host
For info
My PC:
My graphic is GTX 1660 super, 1080p resolution i notice problem on Fifa 21 and NBA 2k21, strange is its periodic, sometimes changing packet size and restart stream helps, but stuttering comes back.
My box:
X96Max Plus with S905x2 4GB ram
no moonlight directory on storage, only bin on addons folder.
Will try record movie. I repeat its periodic, at start stream is great sometimes long sometimes short. I test fps on game its more than 100fps.
EDIT:
So i reinstall RC2 Matrix, add-on too, and set games on full windowed on my host where i have set 1080p@60. Stutter is happen no so often but still. I also fix my spdif 1,3K x96 max and set audio on spdif and passtrough too. All working fine but no sound on streaming, strange is i get sound only when i set hdmi on system settings, but no sound on system I tried change all setting from sound on luna, but nothing change.
Other things i found:
surround setting after uncheck stay on moonlight.conf i have to remove it manually
Wow, just tried the latest release and the video is really fluent and smooth and latency is minimal.
I’m still struggling to get any surround sound if i enable that functionality though :-/ if i disable surround sound I still don’t appear to get any audio.
Just not quite so sure what the trick is to getting a working audio configuration?
5.1 is NOT WORKING and won’t work because Amlogic doesn’t allow 6 channels, the only working configurations were 2 (2.0) and 8 (7.1) channels.
Now, it’s possible that 7.1 setup doesn’t work because of the client (moonlight-embedded) or a driver issue. So if 7.1 doesn’t work and you know its working in Kodi, you can try asking in the official github repo.
I am currently reinstalling my Odroid N2 and did a fresh install of CoreELEC 19.2-Matrix_rc2
I wanted to test local game streaming to my htpc and tried to install script.luna-0.8.2.matrix.112.zip, but when trying to install the .zip i get a dependency error (xbmcswift2 2.4.0).
I also tried to manual setup described and get the following output:
wget https://gist.githubusercontent.com/TheChoconut/fe550f8c19c11f71a85841f135eddecb/raw/ -qO - | bash
=== MOONLIGHT-EMBEDDED DOWNLOAD SCRIPT ===
DISCLAIMER: This download script has been designed for CoreELEC systems.
==========================================
[1/4] Removing old moonlight folder...
[2/4] Downloading latest moonlight-embedded from Personal Dropbox...
Connecting to dl.dropbox.com (162.125.65.15:443)
Connecting to dl.dropboxusercontent.com (162.125.65.15:443)
saving to 'moonlight.tar.gz'
moonlight.tar.gz 100% |****************************************************************************************************************************************************************************| 849k 0:00:00 ETA
'moonlight.tar.gz' saved
[3/4] Extracting moonlight.tar.gz to /storage/moonlight
[4/4] Updating permissions...
chmod: /storage/.kodi/addons/script.luna/resources/lib/launchscripts/osmc/moonlight-heartbeat.sh: No such file or directory
Moonlight-embedded has been downloaded and extracted. You can now test it with commands or you can download Luna and get started there.
Manual setup is now discontinued and won’t work. This dependency should be grabbed from some kind of repo. I thought it was located in the main repos.
Try installing this
I tried configuring my Kodi to 7.1 and still get no sound.
I’ll modify that file to disable surround even when disabled in the configuration, as i try nothing when configured to just stereo as well.
Could you clarify further why 5.1 doesn’t work though? as don’t understand what you mean by saying Amlogic doesn’t allow 6 channels even though Kodi works fine with that config :-/
I’ve an old S912 box that has Android on it and that does work with 5.1 fine on Moonlight.
The Amlogic audio driver that’s used at least on my box only supports 2 or 8 audio channels. So for moonlight to work, it would need to provide 8 audio channels because of the current ALSA implementation.
The reason why 5.1 works in Kodi is because Kodi creates an 8 channel layout with 6 channels mapped to your 6 speakers and 2 silent channels mapped to nothing. Then it provides silence for those two channels and your usual audio for the other six.
I’ve tried implementing that in moonlight-embedded but it introduced latency and errors. It just didn’t work as intended. I have zero experience in ALSA and I don’t really know how it works.
S912 boxes AFAIK don’t have support on v19 Matrix, which means you have to be using old binaries and the old addon, both of which don’t support the new 7.1 surround system.
If you were trying to say it works in the Android app, that’s a totally different system and Android has APIs for these kinds of scenarios.
@smg04 can you check audio output? I asked you before about audio problem which i have.
I have x96 max with spdif problem so last months i were using hdmi and optical out from my tv to my speakers, but recently i repaired my spdif and put optical directly to my device. In system settings i set output for spdif. All works fine for kodi content, but on moonlight no audio. As audio is on for hdmi too so i check and audio on hdmi is playing for moonlight.
Monnlight use only hdmi looks like, i change all possible settings for audio in config but nothing works no audio.
That is probably because sysdefault is hdmi output. In Luna, you have to enable Customize Audio Settings in Streaming settings, then go Select Audio Device and pick a card where it says SPDIF. That should set your audio output to spdif instead of hdmi.
Remember that for SPDIF you can only have 2 raw channels and I believe 6 compressed (using some of the digital codec). Compressed channels are not supported so 5.1 surround won’t work through SPDIF.
i checked all cards in custom settings, but still no sound. Only from tv by hdmi.
Strange is when i set sysdefault and in kodi system settings i choose hdmi i dont have audio on kodi (its correct cause my speakers are connected to spdif) but i get audio on moonlight. What is strange cause my speakers are connected to spdif
Can I get logfile from moonlight when your audio doesn’t work? It’s in ~/.kodi/addons/script.luna/bin/logfile
Make sure you clean exit the program (with a controller or by killing nvstreamer.exe or keyboard shortcut) and also in Advanced → “Enable Moonlight Debug Output”