[Unofficial] moonlight-embedded

@smg04, I’ve just rebooted CoreELEC and have now tried again and gathered the logs.

Hope these help.

kodi.log (92 KB)
dmesg-210122.txt (88.4 KB)
logfile-210122.txt (10.0 KB)

Unfortunately, I have no idea why it’s not working. Can you hear sound? If you have surround sound, try turning it off. Looking at the logs it seems like the decoder is working correctly and frames are being decoded…

Hmm that’s frustrating :frowning:

Yeah I definitely hear the sound, and in surround too. I tried turning surround sound off and it was the same with a black screen.

Morning again @smg04,

Thought I’d add more to this. So I rolled my main CoreELEC box back to version 19.3 and restored my backup for good measure, moonlight was again working perfectly.

So I then tried going to 19.4 RC2 again and applied version 143 and it’s just the same with the black screen.

I have another CoreELEC setup in another room, which is just a bog standard setup so no surround sound etc and that works fine on 19.3 but I observe the same issue with 19.4 RC & Moonlight 143.

Cheers

@smg04, don’t suppose you managed to have any other thoughts as to what may be causing this black screen?

I tried RC3 again with the latest Moonlight build and it was just the same, so had to roll back to RC2.

EDIT: I have updated to Kodi 19.4 and still getting the black screen issue.

Any suggestions? It’s a bit of a shame really as I might have to dig my old S912 out as seems like I may now be stuck at a dead end :frowning:

Same here, black screen no matter what settings I choose.

Try this update:
script.luna-1.1.1-matrix.144.zip (2.6 MB)

Choose coreelec_usb_new as your launch script.
If this is broken, could you somehow try on a fresh install?

Hey @smg04, I’ve been on holiday so only just tried this.

For my setup I’m still having no sucess, but the logs are slightly different this time and now seems to be referring to the audio side not being initialized. Have tried disabling surround etc but still get the same error each time. Also tried the different launch scripts as you had said.

These are the logs:

Moonlight Embedded 2.5.1 (AML;ALSA;PULSE;EMBEDDED)
Connect to R730...
Request https://R730:47984/serverinfo?uniqueid=ec23aeb1a18fc00&uuid=df1b2938-430e-45ea-8756-12e1a580a01d
Response:
<?xml version="1.0" encoding="UTF-16"?><root protocol_version="0.1" query="serverinfo" status_code="200" status_message="OK"><AuthenticationType>1</AuthenticationType><ConnectionState></ConnectionState><CurrentClient>0</CurrentClient><GfeVersion>3.24.0.126</GfeVersion><GsVersion>gs_04_37_30719632</GsVersion><HttpsPort>47984</HttpsPort><LocalIP>192.168.0.131</LocalIP><LocalIPs><Address>192.168.0.131</Address></LocalIPs><LoginState>2</LoginState><MaxLumaPixelsH264>737235008</MaxLumaPixelsH264><MaxLumaPixelsHEVC>589622848</MaxLumaPixelsHEVC><Mode>0</Mode><PairStatus>1</PairStatus><ServerCapability>3895</ServerCapability><ServerCodecModeSupport>3843</ServerCodecModeSupport><ServerColorSpaceSupport>2</ServerColorSpaceSupport><SupportedDisplayMode><DisplayMode><Height>2160</Height><RefreshRate>60</RefreshRate><Width>3840</Width></DisplayMode><DisplayMode><Height>2160</Height><RefreshRate>30</RefreshRate><Width>3840</Width></DisplayMode><DisplayMode><Height>1080</Height><RefreshRate>60</RefreshRate><Width>1920</Width></DisplayMode><DisplayMode><Height>1080</Height><RefreshRate>30</RefreshRate><Width>1920</Width></DisplayMode><DisplayMode><Height>720</Height><RefreshRate>60</RefreshRate><Width>1280</Width></DisplayMode><DisplayMode><Height>720</Height><RefreshRate>30</RefreshRate><Width>1280</Width></DisplayMode></SupportedDisplayMode><accountId>7B6F6FA0136D4826D6C27366DBA478184325A06700206DDF54DBEEFFE867059C</accountId><appversion>7.1.437.0</appversion><currentgame>0</currentgame><gamelistid>317a9503c48bf74a9306ebb3d401744c</gamelistid><gputype>NVIDIA GeForce GTX 1060 6GB</gputype><hostname>R730</hostname><mac>44:A8:42:4A:D7:7B</mac><numofapps>0</numofapps><resyncSuccessful>0</resyncSuccessful><state>MJOLNIR_STATE_SERVER_AVAILABLE</state><uniqueid>cc5b5457-e8e3-48b6-8c3b-33d18ec98ad1</uniqueid></root>

GPU: NVIDIA GeForce GTX 1060 6GB, GFE: 3.24.0.126 (gs_04_37_30719632, 7.1.437.0)
Platform AMLogic VPU
Loading mappingfile gamecontrollerdb.txt
Not mapping input_btrcu as a gamepad
Not mapping gpio_keypad as a gamepad
Not mapping aml_vkeypad as a gamepad
Not mapping vad_keypad as a gamepad
Not mapping cec_input as a gamepad
Not mapping VNCServer SimKey as a gamepad
Request https://R730:47984/applist?uniqueid=ec23aeb1a18fc00&uuid=bf4c243f-53d8-4c0d-9fbd-0040b2019370
Response:
<?xml version="1.0" encoding="UTF-16"?><root protocol_version="0.1" query="applist" status_code="200" status_message="OK"><App><AppInstallPath>C:\Program Files (x86)\Steam\</AppInstallPath><AppTitle>Steam</AppTitle><CmsId>100021711</CmsId><Distributor>Steam</Distributor><ID>1088017781</ID><IsAppCollectorGame>0</IsAppCollectorGame><IsHdrSupported>1</IsHdrSupported><MaxControllersForSingleSession>1</MaxControllersForSingleSession><ShortName>steam</ShortName><SupportedSOPS><SOPS><Height>2160</Height><RefreshRate>60</RefreshRate><Width>3840</Width></SOPS><SOPS><Height>1080</Height><RefreshRate>60</RefreshRate><Width>1920</Width></SOPS><SOPS><Height>720</Height><RefreshRate>60</RefreshRate><Width>1280</Width></SOPS><SOPS><Height>2160</Height><RefreshRate>30</RefreshRate><Width>3840</Width></SOPS><SOPS><Height>1080</Height><RefreshRate>30</RefreshRate><Width>1920</Width></SOPS><SOPS><Height>720</Height><RefreshRate>30</RefreshRate><Width>1280</Width></SOPS></SupportedSOPS><UniqueId>20225001</UniqueId><simulateControllers>0</simulateControllers></App><App><AppInstallPath>D:\Games\Cyberpunk 2077\</AppInstallPath><AppTitle>Cyberpunk 2077</AppTitle><CmsId>100884011</CmsId><Distributor>Steam</Distributor><ID>1088352973</ID><IsAppCollectorGame>0</IsAppCollectorGame><IsHdrSupported>0</IsHdrSupported><MaxControllersForSingleSession>1</MaxControllersForSingleSession><ShortName>cyberpunk_2077</ShortName><SupportedSOPS><SOPS><Height>720</Height><RefreshRate>30</RefreshRate><Width>1280</Width></SOPS><SOPS><Height>720</Height><RefreshRate>60</RefreshRate><Width>1280</Width></SOPS><SOPS><Height>1080</Height><RefreshRate>30</RefreshRate><Width>1920</Width></SOPS><SOPS><Height>1080</Height><RefreshRate>60</RefreshRate><Width>1920</Width></SOPS></SupportedSOPS><UniqueId>101606111</UniqueId><simulateControllers>0</simulateControllers></App><App><AppInstallPath>D:\Games\Shadow of the Tomb Raider\</AppInstallPath><AppTitle>Shadow of the Tomb Raider</AppTitle><CmsId>100883211</CmsId><Distributor>Steam</Distributor><ID>1329735003</ID><IsAppCollectorGame>0</IsAppCollectorGame><IsHdrSupported>1</IsHdrSupported><MaxControllersForSingleSession>1</MaxControllersForSingleSession><ShortName>shadow_of_the_tomb_raider</ShortName><SupportedSOPS><SOPS><Height>720</Height><RefreshRate>30</RefreshRate><Width>1280</Width></SOPS><SOPS><Height>720</Height><RefreshRate>60</RefreshRate><Width>1280</Width></SOPS><SOPS><Height>1080</Height><RefreshRate>30</RefreshRate><Width>1920</Width></SOPS><SOPS><Height>1080</Height><RefreshRate>60</RefreshRate><Width>1920</Width></SOPS></SupportedSOPS><UniqueId>20741001</UniqueId><simulateControllers>0</simulateControllers></App><App><AppInstallPath>D:\Games\Fallout 4\</AppInstallPath><AppTitle>Fallout 4 Far Harbor</AppTitle><CmsId>100885611</CmsId><Distributor>Steam</Distributor><ID>1346592987</ID><IsAppCollectorGame>0</IsAppCollectorGame><IsHdrSupported>0</IsHdrSupported><MaxControllersForSingleSession>1</MaxControllersForSingleSession><ShortName>fallout_4_far_harbor</ShortName><SupportedSOPS><SOPS><Height>720</Height><RefreshRate>30</RefreshRate><Width>1280</Width></SOPS><SOPS><Height>720</Height><RefreshRate>60</RefreshRate><Width>1280</Width></SOPS><SOPS><Height>1080</Height><RefreshRate>30</RefreshRate><Width>1920</Width></SOPS><SOPS><Height>1080</Height><RefreshRate>60</RefreshRate><Width>1920</Width></SOPS></SupportedSOPS><UniqueId>18543611</UniqueId><simulateControllers>0</simulateControllers></App><App><AppInstallPath>D:\Games\Fallout 4\</AppInstallPath><AppTitle>Fallout 4</AppTitle><CmsId>17932211</CmsId><Distributor>Steam</Distributor><ID>1429557126</ID><IsAppCollectorGame>0</IsAppCollectorGame><IsHdrSupported>0</IsHdrSupported><MaxControllersForSingleSession>1</MaxControllersForSingleSession><ShortName>fallout_4</ShortName><SupportedSOPS><SOPS><Height>2160</Height><RefreshRate>30</RefreshRate><Width>3840</Width></SOPS><SOPS><Height>1080</Height><RefreshRate>30</RefreshRate><Width>1920</Width></SOPS><SOPS><Height>720</Height><RefreshRate>30</RefreshRate><Width>1280</Width></SOPS></SupportedSOPS><UniqueId>12456001</UniqueId><simulateControllers>0</simulateControllers></App><App><AppInstallPath>D:\Games\Epic Games\GTAV\</AppInstallPath><AppTitle>Grand Theft Auto V</AppTitle><CmsId>100918511</CmsId><Distributor>TGP</Distributor><ID>1667859416</ID><IsAppCollectorGame>0</IsAppCollectorGame><IsHdrSupported>0</IsHdrSupported><MaxControllersForSingleSession>1</MaxControllersForSingleSession><ShortName>grand_theft_auto_v</ShortName><SupportedSOPS><SOPS><Height>1080</Height><RefreshRate>30</RefreshRate><Width>1920</Width></SOPS><SOPS><Height>1080</Height><RefreshRate>60</RefreshRate><Width>1920</Width></SOPS><SOPS><Height>2160</Height><RefreshRate>30</RefreshRate><Width>3840</Width></SOPS><SOPS><Height>720</Height><RefreshRate>60</RefreshRate><Width>1280</Width></SOPS><SOPS><Height>720</Height><RefreshRate>30</RefreshRate><Width>1280</Width></SOPS><SOPS><Height>2160</Height><RefreshRate>60</RefreshRate><Width>3840</Width></SOPS></SupportedSOPS><UniqueId>0</UniqueId><simulateControllers>0</simulateControllers></App><App><AppInstallPath>C:\Windows\System32\</AppInstallPath><AppTitle>mstsc.exe</AppTitle><CmsId></CmsId><Distributor></Distributor><ID>11837920</ID><IsAppCollectorGame>1</IsAppCollectorGame><IsHdrSupported>0</IsHdrSupported><MaxControllersForSingleSession>1</MaxControllersForSingleSession><ShortName>mstsc_exe</ShortName><SupportedSOPS></SupportedSOPS><UniqueId>0</UniqueId><simulateControllers>0</simulateControllers></App></root>

Request https://R730:47984/launch?uniqueid=ec23aeb1a18fc00&uuid=01486a69-23b1-4f37-9b56-7997b50756f7&appid=11837920&mode=1920x1080x60&additionalStates=1&sops=0&rikeycodec_init amstream version : 2.0
=d6678e2641a8c61f2fe5dfa0ba748701&rikeyid=-512104537&localAudioPlayMode=0&surroundAudioInfo=196610&remoteControllersBitmap=0&gcmap=0
Response:
<?xml version="1.0" encoding="UTF-16"?><root protocol_version="0.1" query="launch" status_code="200" status_message="OK"><DisplayHeight>1080</DisplayHeight><DisplayWidth>1920</DisplayWidth><EnhancedStreamMode>1</EnhancedStreamMode><HdrMode>0</HdrMode><RefreshRate>60</RefreshRate><avkey>ok</avkey><gamesession>a7f0437fee5dec032d2459ab8b54edaf</gamesession><rikey>ok</rikey><sessionUrl0>rtsp://192.168.0.131:48010</sessionUrl0><wssignaling>0</wssignaling></root>

Stream 1920 x 1080, 60 fps, 60000 kbps
RTSP port: 48010
Initializing platform...done
Resolving host name...done
Initializing audio stream...done
Starting RTSP handshake...Audio port: 48000
Video port: 47998
Control port: 47999
done
Initializing control stream...done
Initializing video stream...done
Initializing input stream...done
Starting control stream...done
Starting video stream...done
Starting audio stream...dEVIOCGRAB failed with error 16

Unfortunately, that error doesn’t mean anything. This error is just some input device failing to initialize because it’s not ready yet. Your streams are all loading correctly and frames should be displaying. I’m guessing your vfm map is not correct or something like that… Could you give your dmesg output?

@smg04, sure here you go.

dmesg.txt (88.1 KB)

Actually can hear sound, just a blank screen like before, so still seems to be the same issue as previous versions :frowning:

Can you also send dmesg when you play any kind of h265 video in Kodi?

@smg04, here you go, hope this helps.

dmesg130422.txt (469.9 KB)

EDIT:

Have done some new ones for you as the above is probably no good as hadn’t rebooted the box.

Have done one with h264 playback and the other with h265 - as I have two machines with Nvidia GPU, one of them being a 1650 which doesn’t encode the gamestream in HEVC and I tried both options with Moonlight with no success from both my machines.

dmesg-h264.txt (112.7 KB)
dmesg-h265.txt (112.5 KB)

upgraded to coreelec-20, and using script.luna-1.1.1-matrix.144.zip with no luck, black screen.
also need to place old libcrypto.so.1.1 file to addon’s lib folder.

Hey I’m getting the same black screen error, using script.luna-1.1.1-matrix.144.zip and any previous version.

Luna log (while in black screen state):

codec_init amstream version : 2.0

Luna log (after quitting from black screen):

codec_init amstream version : 2.0
Searching for server...
Connect to 192.168.0.58...
RTSP port: 48010
Initializing platform...done
Resolving host name...done
Initializing audio stream...done
Starting RTSP handshake...Audio port: 48000
Video port: 47998
Control port: 47999
done
Initializing control stream...done
Initializing video stream...done
Initializing input stream...done
Starting control stream...done
Starting video stream...done
Starting audio stream...done
Starting input stream...done
Received first audio packet after 0 ms
Initial audio resync period: 575 milliseconds
Received first video packet after 0 ms
Assigned Xbox 360 Wireless Receiver as player 1
Alsa error from writei: -11
Alsa error from writei: -11
Stopping input stream...done
Stopping audio stream...ENet wait interrupted
Control stream connection failed: -1
done
Stopping video stream...done
Stopping control stream...ENet peer acknowledged disconnection
done
Cleaning up input stream...done
Cleaning up video stream...done
Cleaning up control stream...done
Cleaning up audio stream...done
Cleaning up platform...done

kodi.log (103.1 KB)
dmesg.txt (155.4 KB)

Hopefully this can be of some help, thanks!

@jollybully Please run the latest version of Luna, the old version is trying to start the decoder in a way that is no longer supported.
script.luna v1.1.0-matrix.131 installed.

@benzhe I need kodi.log and dmesg output to figure out what is breaking.

On my end, running the latest version of luna and moonlight-embedded (1.1.1-matrix.144) works just fine and both audio and video work. Since I only have an older S905D device, it’s possible the newer devices have a different naming scheme and that the vfm mapping is no longer correct.

So if you are experiencing black screen issues, send kodi.log and dmesg output so I can figure it out.

EDIT: If its not a problem, also send output of this command: cat /sys/class/vfm/map while playing h264/h265 content on Kodi and on moonlight.

@smg04, was any of the information I sent over previously any use to you?

@Adam86 All of the logs you’ve sent seem to indicate that the decoder was initialized correctly and the frames are being sent somewhere. On your end though, something is blocking those frames to be displayed on the output buffer. My guess is the vfm mapping, so if you could just send the output of cat /sys/class/vfm/map command on Kodi and moonlight, that would help. You can also try these series of commands to try and remove other video components to see if it helps at all to display the frames while moonlight is running:
echo 0 > /sys/class/tsync/enable
echo 0 > /sys/class/video/disable_video

@smg04, great stuff, will do this ASAP for you. I miss my gaming fix :frowning:

Thanks @smg04

Now running script.luna v1.1.1-matrix.144 on the Odroid N2+ and the video stream never seems to initialise, the system hangs in the addon view and all input is blocked, i am however able to hear audio from the host.

The commands you provided previously have no effect

echo 0 > /sys/class/tsync/enable
echo 0 > /sys/class/video/disable_video

Here’s the result of cat /sys/class/vfm/map

Moonlight h265

[00]  default { vdec.h265.00(1) amvideo}
[01]  dvblpath { dvbldec(0) amvideo}
[02]  dvelpath { dveldec(0) dvel}
[03]  dvhdmiin { dv_vdin(0) amvideo}
[04]  vdec-map-0 { vdec.h265.00(1) amlvideo(0) ppmgr(0) deinterlace(0) amvideo}

provider list:
   vdec.h265.00

receiver list:
   video_render.0
   video_render.1
   amvideo
   videopip
   deinterlace
   dimulti.1
   dimulti.2
   dimulti.3
   ppmgr
   dvel
   amlvideo
   aml_video.1

Moonlight h264

[00]  default { vdec.h264.00(1) amvideo}
[01]  dvblpath { dvbldec(0) amvideo}
[02]  dvelpath { dveldec(0) dvel}
[03]  dvhdmiin { dv_vdin(0) amvideo}
[04]  vdec-map-0 { vdec.h264.00(1) amlvideo(0) ppmgr(0) deinterlace(0) amvideo}

provider list:
   vdec.h264.00

receiver list:
   video_render.0
   video_render.1
   amvideo
   videopip
   deinterlace
   dimulti.1
   dimulti.2
   dimulti.3
   ppmgr
   dvel
   amlvideo
   aml_video.1

Kodi h265

[00]  default { decoder(0) amvideo}
[01]  dvblpath { dvbldec(0) amvideo}
[02]  dvelpath { dveldec(0) dvel}
[03]  dvhdmiin { dv_vdin(0) amvideo}
[04]  vdec-map-0 { vdec.h265.00(1) amlvideo(1) ppmgr(1) deinterlace(1) amvideo}

provider list:
   vdec.h265.00
   amlvideo
   ppmgr
   deinterlace

receiver list:
   video_render.0
   video_render.1
   amvideo
   videopip
   deinterlace
   dimulti.1
   dimulti.2
   dimulti.3
   ppmgr
   dvel
   amlvideo
   aml_video.1

Kodi h264

[00]  default { decoder(0) amvideo}
[01]  dvblpath { dvbldec(0) amvideo}
[02]  dvelpath { dveldec(0) dvel}
[03]  dvhdmiin { dv_vdin(0) amvideo}
[04]  vdec-map-0 { vdec.h264.00(1) amlvideo(1) ppmgr(1) deinterlace(1) amvideo}

provider list:
   vdec.h264.00
   amlvideo
   ppmgr
   deinterlace

receiver list:
   video_render.0
   video_render.1
   amvideo
   videopip
   deinterlace
   dimulti.1
   dimulti.2
   dimulti.3
   ppmgr
   dvel
   amlvideo
   aml_video.1

Thanks for taking the time to look into this, this really is a great addon!

dmesg.txt (108.3 KB)
kodi.log (78.6 KB)

Is the screen black or hangs on Kodi and doesn’t respond to input?
Is it possible all of you are seeing last Kodi frame and not a black screen?

If the screen is not black, it’s possible that the stream is actually displayed but its below Kodi frame as Kodi always has priority over it… If the screen is black, though, there’s some more investigation required.