Moonlight-embedded and Luna Launcher

Hello, I’m new here.
I’ve just received a Vero 4k and i’m wondering if is there any way to run moonlight in it?
I’ve seen some posts and tutorials about installing it in RPi3 and RPi2, but nothing about Vero 4k.
Is it possible? If not, there’s anyone trying to achieve it?

Since moonlight-embedded requires rbp-userland-osmc which is not available on the Vero (which uses “vero*-userland-osmc”) it won’t work.

You can go and ask the developer to consider building moonlight for the Vero family though, maybe he’ll look into it.

Hi

I remember someone mentioning it but I don’t think anyone’s attempted it yet.

I just searched and there are OSMC instructions on compiling here, but I’m not sure if this is something you want to do / if you are familiar with the command line.

It looks like following the OSMC instructions would work, but the two Raspberry Pi packages should be substituted for vero3-userland-dev-osmc

There’s already AMLogic support, so it should just work with the above change and:

export CFLAGS="-I/opt/vero3/include -L/opt/vero/lib"
export CPPFLAGS=$CFLAGS
export CXXFLAGS=$CFLAGS

before building.

Sam

1 Like

I was the one who asked for the same thing on reddit :yum:

Guess I’ll compile it then. Hopefully tonight. Will keep you posted.

EDIT: Since it’s mentioned on the “compiling…” page, do you think the mentioned patch here moonlight-embedded/openssl.patch at raspbian/jessie · moonlight-stream/moonlight-embedded · GitHub is needed? Seems like an old openssl patch @sam_nazarko

1 Like

Yes, it still looks required. See Debian -- Error.

Sam

Thank you very much for your help! :slight_smile:

@sam_nazarko when I went to install the required packages, apt told me vero3-userland-osmc was going to be upgraded as well. Is it safe? I haven’t upgraded yet to the September version of OSMC and don’t want to bork the system.

Yes – it should be fine.
I’d recommend updating to September first however if you can. I don’t anticipate any problems.

Will upgrade then before compiling. Thanks!

Keep me posted.

Sam

First obstacle, latest Moonlight requires cmake >= 3.1, but changing the requirement in CMakeLists.txt was easy peasy (hope 3.1 didn’t change much).

Then I got “No video output available”, meaning AMLogic cannot be detected. Is there something I need to do so that cmake “sees” it?

EDIT: Found the libs (/usr/osmc/lib). The only thing missing is codec.h (described as “Amlogic include directory”), the original folders where it should be available are:

/usr/local/include/amcodec
/usr/include/amcodec
/usr/include/

I couldn’t find it on the Vero. Can I get it somewhere? EDIT: Found here: GitHub - osmc/libamcodec

Let’s see now…

Well, libamcodec needs libavcodec, which in turn needs libavutil. Both can be installed with apt (libavcodec-dev libavutil-dev). I guess the list will become quite long… I’ll pick up from here tomorrow :+1:

1 Like

You can grab armv7-cmake-osmc

You can get it by installing vero3-libamcodec-dev-osmc.

EDIT: Sorry, I had to apply the patch mentioned above :wink: cmake went through.

Now a strange one:

/home/osmc/moonlight-embedded/third_party/moonlight-common-c/reedsolomon/rs.c:399:9: error: 
'for' loop initial declarations are only allowed in C99 or C11 mode
         for (int row = 0; row < rs->shards; row++) {
         ^

Judging from this: build error: for loop initial declaration used outside C99 mode · Issue #553 · moonlight-stream/moonlight-embedded · GitHub it seems that gcc-5 works but gcc-4 does not.

Add -std=c99 to the Makefile in that directory only (best option) or append it to CFLAGS

I had to fix every variable initialization outside of for loops for some files because using -std=c99 produced even more errors, but…

It compiled fine!

One thing is that using make install does not work, i had to use sudo make install that showed:

osmc@osmc:~/moonlight-embedded/build$ sudo make install
[ 42%] Built target moonlight-common
[ 64%] Built target gamestream
[ 68%] Built target moonlight-aml
[ 97%] Built target moonlight
[100%] Built target docs
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/lib/libmoonlight-aml.so
-- Set runtime path of "/usr/local/lib/libmoonlight-aml.so" to ""
-- Installing: /usr/local/bin/moonlight
-- Set runtime path of "/usr/local/bin/moonlight" to ""
-- Installing: /usr/local/share/moonlight/gamecontrollerdb.txt
-- Installing: /usr/local/etc/moonlight.conf
-- Installing: /usr/local/lib/libgamestream.so.2.4.3
-- Installing: /usr/local/lib/libgamestream.so.2
-- Installing: /usr/local/lib/libgamestream.so
-- Set runtime path of "/usr/local/lib/libgamestream.so.2.4.3" to ""
-- Installing: /usr/local/lib/libmoonlight-common.so.2.4.3
-- Installing: /usr/local/lib/libmoonlight-common.so.2
-- Installing: /usr/local/lib/libmoonlight-common.so
-- Installing: /usr/local/share/man/man1/moonlight.1

Problem is that /usr/local/bin/moonlight doesn’t work, since it says:

moonlight: error while loading shared libraries: libgamestream.so.2: cannot open shared object file: No such file or directory

But /usr/local/lib/libgamestream.so.2 is indeed there.

EDIT: Fixed by running ldconfig. If i try to run it I get:

osmc@osmc:~/moonlight-embedded/build$ moonlight stream
Searching for server...
Connect to 192.168.178.20...
Platform 'auto' not found

I try to stream using moonlight in the build folder instead it runs fine (says “Platform AMLogic VPU”), but there are problems:

osmc@osmc:~/moonlight-embedded/build$ ./moonlight stream -4k
Searching for server...
Connect to 192.168.178.20...
No mapping available for meson-ir (19000000000000000000000000000000) on /dev/input/event2
No mapping available for gpio_keypad (10000000010000000100000000010000) on /dev/input/event0
No mapping available for cec_input (100000008e1b0000ec0c000001000000) on /dev/input/event1
Initializing platform...done
Resolving host name...done
Starting RTSP handshake...done
Initializing control stream...done
Initializing video stream...done
Initializing audio stream...done
Initializing input stream...done
Starting control stream...done
OPEN es DEVICE
codec_init amstream version : 2.0
[codec_init 732]type =1
[codec_init 740]
Starting video stream...done
ALSA lib pcm_direct.c:896:(snd1_pcm_direct_initialize_slave) slave plugin does not support mmap interleaved or mmap noninterleaved access
ALSA lib pcm_dmix.c:1034:(snd_pcm_dmix_open) unable to initialize slave
Starting audio stream...Alsa error code -22
Audio stream start failed: -1
Stopping video stream...ENet wait interrupted
Control stream connection failed
Loss Stats: Transaction failed: 11
[codec_close 851]
[codec_close_cntl]video codec close return=0!
done
Stopping control stream...done
Cleaning up input stream...done
Cleaning up audio stream...done
Cleaning up video stream...done
Cleaning up control stream...done
Cleaning up platform...done
EVIOCGRAB failed with error 16
EVIOCGRAB failed with error 16

Is there a way I can make a deb file so that maybe you can test if somehing’s wrong with the Vero 4k? @sam_nazarko

EDIT: Made a tar file, uploaded here: Zippyshare.com -

1 Like
EVIOCGRAB failed with error 16

Seems to be some issue with NVIDIA. I don’t know much about it.

It might be needed to pass the right ALSA HW to moonlight.
Also make sure Kodi is stopped before running.

Unfortunately I don’t have a trivial way to test Moonlight. The only NVIDIA GPU I have access to is in my laptop, running Linux.

Sam

I’ll open an issue on moonlight’s github. Hopefully someone will see what’s wrong. Thanks!

Issue link is here: Vero 4K support · Issue #573 · moonlight-stream/moonlight-embedded · GitHub

2 Likes

Check the version of the nvidia client on PC perhaps

It’s already the latest version :wink:

Does that version work with other platforms?

Sam