[HowTo] Moonlight-Embedded (former Limelight) using Luna Launcher

a lot of variables when streaming content like router etc.

hard to say why your gear is acting the way it is but i recommend trying different things too see if the end result gets better.

Ok. I think i have made a little progress here.

I tried the android client app (moonlight for android https://play.google.com/store/apps/details?id=com.limelight&hl=el) in my samsung s3 device. I wanted to test it out in order to eliminate some things.
In the beggining i had same issues with my rasp1 (a little video “choppiness” when the screen was rolling - i tested NBA 2K14 game, same game for both rasp and android clients).

I tried to minimize this with lowering the target bitrate (i set it to 3 instead of 10). So my question is: is there any option in moonlight embedded to lower the target bitrate?? I now use the command (to launch moonlight):

moonlight stream -mapping xbox.map 192.168.1.109

(in raspbian image of course but it will be identical i suppose)

by defining it in a config file :slight_smile:

Or

moonlight stream 192.168.1.109 -mapping xbox.map -bitrate 3000

:sunglasses:

What is the default bitrate? Would i gain better fps if i lower my bitrate?

as i said before try no idea since im not on your setup.

Well i did lowered the bitrate to 3000. Although picture quality deteriorated a lot, not much of a gain in terms of NBA2K14 “smoothness” (it is somehow better but not perfect). So i guess it may be a matter of my host pc/gfe/network/moonlight app (or maybe just rasp1 has not enough power(?) for the decoding procedure).

I tend to think that my server pc needs more cpu power though (as i tried TocaRace 3 in full hd and played perfect in 3000 bitrate)

I followed the guide and i get:

osmc@osmc:~$ sudo apt-get install moonlight-osmc
Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
moonlight-osmc : Depends: moonlight-embedded but it is not installable
E: Unable to correct problems, you have held broken packages.
osmc@osmc:~$

Any thoughts?

You probably don’t have irtimmers repo in your sources.list. If you’ve manually installed moonlight-embedded the script in its current state doesn’t check for that.

I will be pushing the new version to github later today (I just have to verify it installs as it should). This version will be a Kodi addon, and so a lot will be different/fixed.
##Whats working:

  • A basic Kodi addon with all the functionality from the old versions
  • A working settings.xml based Kodi configuration page
    • IP, resolution (1080/720), framerate, input (device + map), bitrate, host optimizations (enable/dissable) and local audio (enable/dissable)
      ##To-do:
  • GUI-based stuff:
    • Input mapping
    • Pairing
  • Automated installation of moonlight-embedded
  • Lots of optimization

What I want to add:

  • Games list? (Instead of launching Steam)

Steam, Battle.net, Origin

that should cover alot of games :stuck_out_tongue:

I just uploaded the first pre-release of the new Kodi add-on to the new repo on github!

https://github.com/dodslaser/script.moonlight-embedded

Edit: I should point out that it is even hackier than the previous versions. I’ve tested it, and it runs fine for me, but expect some crazy bugs/crashes/freezes anyway!

Can you advise specifically what hardware this has been tested and known to work on?

I’m running a RPi Model B (512M). The performance could be better, but it’s definitely enough. A higher memory split (256/256) and moderate overclock helps.

Edit: I’ll probably upgrade to a Pi2 soon.

1 Like

I am a little confused (again).

I ve finally managed to install moonlight from here

I have also managed to create a shortcut in kodi (with a nice png file) to launch from the GUI. A quick question:

My /etc/moonlight-osmc/moonlight-osmc.conf file is smth like this:

#!/bin/sh
MOONLIGHT_RES='-720'
MOONLIGHT_IP='192.168.1.109'
MOONLIGHT_ARGS='-30fps'
  1. How can i use an xbox controller? Do i add it somehow - here? I know i need an xbox.map and then some arguments. But in raspbian i just used

moonlight map xbox.map , and followed the instructions to create it.

Is this still on to-do list?

  1. How can i change streamming bitrate to - let’s say 3000?

Just replace the last line with:
MOONLIGHT_ARGS="-30fps -input /path/to/device -map /path/to/map"

Well that doesnt work. I used

MOONLIGHT_ARGS=“-30fps -input /dev/input/event0 -map /home/osmc/xbox.map”

I placed xbox.map (downloaded from here) in /home/osmc/ (i had permission troubles copying to /usr/etc) and used lsinput command to check for my wireless xbox input.

I get an error "…option should be followed by the input to be mapped (i can’t see the first words). My lsinput output is here

Edit: I cjanged it to MOONLIGHT_ARGS=‘-30fps -mapping xbox.map -input /dev/input/event0’ and now i get an error “unable to open custom mapping file: xbox.map”

Any thoughts?

Ah, I forgot the order matters. What is your output of ls -l /home/osmc/xbox.map?

You could always try mapping the input yourself.

Edit: Oh and the version you’re using is not being developed anymore. I’m replacing it with a Kodi add-on

Well my ls command is this

osmc@osmc:~$ ls -l /home/osmc/xbox.map
-rwxr-xr-x 1 osmc osmc 498 Oct 25 12:00 /home/osmc/xbox.map

I have also attached a wired gamepad (logitech) and used lsinput to show me the info. I then used jstest /dev/input/js0 to test it, but while i can see this:

osmc@osmc:~$ jstest /dev/input/js0
Driver version is 2.1.0.
Joystick (Logitech RymblePad 2 pad) has 8 axes (X, Y, Z, Rx, Ry, Rz, Hat0X, Hat0Y)
and 11 buttons (BtnX, BtnY, BtnTL, BtnTR, BtnTR2, BtnSelect, BtnThumbL, BtnThumbR, ?, ?, ?).
Testing … (interrupt to exit)
Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off Axes: 0: 0 1: -1 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off Axes: 0: 0 1: -1 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off Axes: 0: 0 1: -1 2: 0 3: 0 4: 0 5: 0 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off Axes: 0: 0 1: -1 2: 0 3: 0 4: -1 5: 0 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off Axes: 0: 0 1: -1 2: 0 3: 0 4: -1 5: 0 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off Axes: 0: 0 1: -1 2: 0 3: 0 4: -1 5: 0 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off Axes: 0: 0 1: -1 2: 0 3: 0 4: -1 5: 0 6: 0 7: 0 Buttons: 0:off 1:off 2:off 3:off 4:off 5:off 6:off 7:off 8:off 9:off 10:off

when i move buttons and sticks nothing works! Any ideas?

Edit: I will try this for my xbox controller and will keep my fingers crossed…

Edit:

Well i ve followed this guide and managed to use my xbox controller with moonlight embedded (didnt use the kodi-add-on). It works as expected and thanks for this nice how to!

About kodi-addon: Nice RGUI and very nice try really. Of course there are problems too. One major one is in having any of my controllers to work. This is my add-on settings. I always get a “input device not mapped” even though there is an xbox controller in /dev/input/eventX found in lsinput command. My keyboard/mouse inputs are working as expected. So for now - i leave it aside :smirk:

Now - the only think that remains - is how to use my second/3rd wired controller with moonlight embedded! If anyone knows please share it with us!:smile:

Try with sudo