Giter Club home page Giter Club logo

plugin.program.moonlight-qt's People

Contributors

jhakonen avatar jorys-paulin avatar kernelcontrol avatar veldenb avatar witchent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

plugin.program.moonlight-qt's Issues

Add apps as separate home entries

I use this plugin to launch Steam BigPicture mode and nothing else. In order to do that I always need to go to Games -> Moonlight -> Steam BigPicture. Is it possible to add BPM to the Games screen directly?

No sound trough Bluetooth

Hello, the sound is working properly through hdmi but if I choose Bluetooth through libreelec config there's no sound. rpi4b & libreelec 11.0.3

Starting Moonlight crash?

New installation of "LibreELEC-RPi4.arm-10.0.2.img" on Pi4 2MG and then Docker and "plugin.program.moonlight-qt-0.1.6.zip" addon; Moonlight updated from the addon successfully.

When I launch Moonlight from Moonlight addon, it displays "Starting Moonlight..." and then goes back to Kodi

Did I miss anything?

Crash on start with LibreELEC12 on Pi4

I tried to install this on my Raspberry Pi 4, latest nightly of LibreELEC 12.
Installing seems to work, but if I start moonlight after "install latest version" it crashes with the following log:
cat /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt.log:

Platform 'rpi' running 'libreelec' detected...
Loading LibreELEC profile for setting up environment...
Using custom libraries from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib...
Using Qt library from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib/qt5...
Running without window manager...
Detected resolution 1920,1080...
Using Qt scale factor 0.64...
Using Kodi hooks for libreelec...
--- Starting Moonlight ---
bootstrap_moonlight-qt.sh: line 148: ./moonlight-qt: not found

I looked in the folder and got:
ls -lah /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/bin/
-rwxr-xr-x 1 root root 5.8M Oct 27 13:06 moonlight-qt

I entered echo $PWD before the aforementioned line, and now the output reads

--- Starting Moonlight ---
/storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/bin
bootstrap_moonlight-qt.sh: line 149: ./moonlight-qt: not found

That does not make any sense to me, it seems that the addon is in the correct directory, the file is there, but the bootstrap does not find it.
Any idea how to further debug/fix this?
I think it might be related to the switch to Aarch64 for the pi4 build of LibreELEC, but I am sadly not experienced enough to confirm this.

Moonlight Add-on fails to run (solved) / Vertical tile - LE 10 nightly RPi4 4GB

Hi, i'm trying in nightly 'cause the 4K60P support, fresh after a reboot, just ran once.

This is an extract:

2021-07-09 19:46:22.759 T:1145 ERROR : EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'KeyError'>
Error Contents: 'apps'
Traceback (most recent call last):
File "/storage/.kodi/addons/plugin.program.moonlight-qt/addon.py", line 226, in
show_gui(addon_handle, page_mode, page_host_id, page_game_id)
File "/storage/.kodi/addons/plugin.program.moonlight-qt/addon.py", line 157, in show_gui
show_games(handle, hosts, host_id)
File "/storage/.kodi/addons/plugin.program.moonlight-qt/addon.py", line 134, in show_games
for app_id, app in host['apps'].items():
KeyError: 'apps'
-->End of Python script error report<--

If i find a solution, i'll mark it solved/close the issue.

kodi.log

Failing to install

When I try to open Moonlight addon after installing from zip file, I get an error: Update failed: sudo: a password is required.

I am running Kodi on NixOS on a RBP4. The kodi session is ran by a user in the wheel group.

Addon update failed on RPI5 with error: No such file or directory

I have clean install of LibreELEC (11.0.4) on RPi5.
Then I installed docker and moonlight, but on first moonlight start it fails with error:
screenshot00000

I checked path from error in logs: "Updating moonlight-qt finished with 776 lines of output and exit-code 0: cp: cannot stat '/usr/lib/aarch64-linux-gnu/libGL.so*': No such file or directory"
Directory "aarch64-linux-gnu" not exists.
I am not sure if it is problem because of RPi5, or I am missing some dependency.

Wrong resolution in moonlight-qt

Moonlight-qt seems to use the default resolution offered by the screen/TV, however for my TV it is not optimal at all and makes any text unreadable.

Is there a way to force moonlight-qt to display with a custom resolution ?

Intel N100 (alder lake) hardware support

I got the message that no supported GPU could be found, and moonlight would fall back to software decoding.

But I'm using an Intel N100 mini pc. It has integrated graphics.

The OS I'm using is libreelec. I tried different versions (both nightly and regular). But now I'm using the nightly version with Linux kernel v 6.6.0.

Moonlight QT version I'm using it V5.0.1

Is here the correct place to report it? Or should I report it with libreelec?

ConfigParser crashes during pasing moonlight config

Hi all,

I am having the problem, that moonlight is crashing during starting once configured (e.g. I ran it successfully and configured moonlight, then it crashed when i tried to launch the plugin again.)

From the log the error was:
2022-09-11 19:35:01.376 T:1415 ERROR : EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'configparser.InterpolationSyntaxError'>
Error Contents: '%' must be followed by '%' or '(', found: '%)'
Traceback (most recent call last):
File "/storage/.kodi/addons/plugin.program.moonlight-qt/addon.py", line 227, in
show_gui(addon_handle, page_mode, page_host_id, page_game_id)
File "/storage/.kodi/addons/plugin.program.moonlight-qt/addon.py", line 150, in show_gui
hosts = get_moonlight_config().get('hosts')
File "/storage/.kodi/addons/plugin.program.moonlight-qt/addon.py", line 52, in get_moonlight_config
return parse_moonlight_config(moonlight_full_config_path)
File "/storage/.kodi/addons/plugin.program.moonlight-qt/addon.py", line 65, in parse_moonlight_config
optionValue = config.get(section, option)
File "/usr/lib/python3.8/configparser.py", line 799, in get
File "/usr/lib/python3.8/configparser.py", line 395, in before_get
File "/usr/lib/python3.8/configparser.py", line 442, in _interpolate_some
configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%)'
-->End of Python script error report<--

The line that propably produced the error in the moonlight.conf file was the following:
1\mac=@bytearray(*******%)
(Note: I censored the first 8 characters and replaced them with * as they are probably not relevant.)
As i understand it this is a file produced by moonlight itself, so editing is no option.
My fix was to Replace ConfigParser with RawConfigParser in addon.py line 56.
Now it is at least running again and i can launch Moonlight again.

My question is, was this the right solution to the problem?
Should i make a pull request?

Also note when upgrading to > Python 3.2 this is the new way forwared (https://stackoverflow.com/questions/14340366/configparser-and-string-with):
configParser = configparser.ConfigParser(interpolation=None)

Crash on start with LibreELEC12 on Pi5

I installed this plugin on my Raspberry Pi 5, latest nightly of LibreELEC 12 (Nightly 20231116).
Install process worked fine, but when I start moonlight the OS seems to crash and the plugin generates the following log (moonlight-qt.log):

Platform rpi (aarch64) running libreelec 12.0 detected...
Loading LibreELEC profile for setting up environment...
Using custom libraries from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib...
Using Qt library from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib/qt5...
Running without window manager...
Detected resolution 3840,2160...
Using Qt scale factor 1.28...
Using Kodi hooks for libreelec...
--- Starting Moonlight ---
00:00:00 - Qt Info: Unable to detect Wayland or X11, so EGLFS will be used by default. Set QT_QPA_PLATFORM to override this.
00:00:00 - Qt Info: Setting display mode by default. Set QT_QPA_EGLFS_ALWAYS_SET_MODE=0 to override this.
00:00:00 - Qt Warning: QStandardPaths: wrong permissions on runtime directory /var/run/, 0755 instead of 0700
WARNING: v3d support for hw version 71 is neither a complete nor a conformant OpenGL implementation. Testing use only.
00:00:00 - Qt Critical: drmModeGetResources failed (Operation not supported)
00:00:00 - SDL Info (0): Compiled with SDL 2.29.0
00:00:00 - SDL Info (0): Running with SDL 2.29.0
00:00:00 - Qt Info: No translation available for "C"
00:00:00 - Qt Fatal: Cannot create window: no screens available
Aborted (core dumped)

This is an excerpt from the system log (01_KODI.log):

2023-11-16 06:55:39.231 T:6497     info <general>: Launching moonlight-qt update: ADDON_PROFILE_PATH="/storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt" bash /storage/.kodi/addons/plugin.program.moonlight-qt/resources/build/build.sh | tee /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/build.log
2023-11-16 06:57:32.060 T:6414     info <general>: CActiveAESink::OpenSink - initialize sink
2023-11-16 06:57:32.060 T:6414     info <general>: CAESinkALSA::Initialize - Attempting to open device "hdmi:CARD=vc4hdmi0,DEV=0"
2023-11-16 06:57:32.061 T:6414     info <general>: CAESinkALSA::Initialize - Opened device "hdmi:CARD=vc4hdmi0,DEV=0,AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x00"
2023-11-16 06:57:32.061 T:6414     info <general>: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2023-11-16 06:57:32.061 T:6414     info <general>: CAESinkALSA::InitializeHW - Using data format AE_FMT_S24NE3
2023-11-16 06:57:42.263 T:6406     info <general>: Loading skin file: DialogConfirm.xml, load type: KEEP_IN_MEMORY
2023-11-16 06:58:00.646 T:6406     info <general>: Loading skin file: DialogSelect.xml, load type: KEEP_IN_MEMORY
2023-11-16 06:58:10.156 T:6406     info <general>: Loading skin file: MyGames.xml, load type: KEEP_IN_MEMORY
2023-11-16 06:58:13.068 T:11659    info <general>: New ALSA config file written to /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-home/.config/alsa/asoundrc
2023-11-16 06:58:13.068 T:11659    info <general>: Launching moonlight-qt: systemd-run --setenv=ADDON_PROFILE_PATH="/storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt" --setenv=PULSE_SERVER="none" --setenv=SDL_AUDIODRIVER="alsa" bash /storage/.kodi/addons/plugin.program.moonlight-qt/resources/bin/launch_moonlight-qt.sh 
2023-11-16 06:58:14.031 T:6406     info <general>: Quitting due to POSIX signal
2023-11-16 06:58:14.064 T:6406     info <general>: Saving exitCode 65
2023-11-16 06:58:14.064 T:6406     info <general>: Stopping the application...
2023-11-16 06:58:14.064 T:6406     info <general>: Stopping player
2023-11-16 06:58:14.064 T:6406     info <general>: Storing total System Uptime
2023-11-16 06:58:14.064 T:6406     info <general>: Saving settings
2023-11-16 06:58:14.068 T:6406     info <general>: Saving skin settings
2023-11-16 06:58:14.068 T:6406     info <general>: Stopping all
2023-11-16 06:58:14.068 T:6406     info <general>: ES: Stopping event server
2023-11-16 06:58:14.213 T:6430     info <general>: ES: UDP Event server stopped
2023-11-16 06:58:14.903 T:6406     info <general>: stopping zeroconf publishing
2023-11-16 06:58:14.914 T:6427     info <general>: SETTINGS: stop_service # ## LibreELEC Addon ## STOP SERVICE DONE !
2023-11-16 06:58:14.914 T:6459     info <general>: SETTINGS: run # updateThread Stopped
2023-11-16 06:58:14.915 T:6460     info <general>: SETTINGS: run # Received exit
2023-11-16 06:58:16.262 T:6406     info <general>: Application stopped
2023-11-16 06:58:17.235 T:6406     info <general>: AddOnLog: peripheral.joystick: Disabling joystick interface "linux"
2023-11-16 06:58:17.235 T:6406     info <general>: ADDON: Dll Destroyed - Joystick Support
2023-11-16 06:58:17.235 T:6406     info <general>: unload skin
2023-11-16 06:58:17.253 T:6406     info <general>: Unloaded skin
2023-11-16 06:58:17.264 T:6406     info <general>: unload sections
2023-11-16 06:58:17.265 T:6406     info <general>: CWSDiscoveryListenerUDP::Stop - Stopped
2023-11-16 06:58:17.436 T:6406     info <general>: Exiting the application...

Not sure where to go from here but any help would be appreciated. Please let me know if any extra logs or tests are needed.

TIA.

Strange things with building image of `generic` Dockerfile

I have the following error when my LibreELEC 11.0.3 system tries to build the mentioned Dockerfile (both from the Moonlight plugin and manually):

Step 1/5 : FROM debian:bullseye-slim
---> 1411dd05edfc
Step 2/5 : RUN apt-get update  && DEBIAN_FRONTEND=noninteractive apt-get install -y     libfuse2     libgudev-1.0-0     libinput10     libsm6     libxcb-cursor0     libxcursor1     libxi6     qml-module-qtquick2     wget&& apt-get clean  && rm -rf /var/lib/apt/lists/*  && DOWNLOAD_URL=$(wget --quiet --header "Accept: application/vnd.github.v3+json" --output-document - https://api.github.com/repos/moonlight-stream/moonlight-qt/releases/latest | grep -o '"browser_download_url": "[^"]*' | grep -o '[^"]*$' | grep ".AppImage")  && wget "$DOWNLOAD_URL" -O /tmp/Moonlight-downloaded.AppImage  && chmod a+x /tmp/Moonlight-downloaded.AppImage
---> Running in 67c44f664f5a
exec /bin/sh: no such file or directory
The command '/bin/sh -c apt-get update  && DEBIAN_FRONTEND=noninteractive apt-get install -y     libfuse2     libgudev-1.0-0     libinput10     libsm6     libxcb-cursor0     libxcursor1     libxi6     qml-module-qtquick2wget  && apt-get clean  && rm -rf /var/lib/apt/lists/*  && DOWNLOAD_URL=$(wget --quiet --header "Accept: application/vnd.github.v3+json" --output-document - https://api.github.com/repos/moonlight-stream/moonlight-qt/releases/latest | grep -o '"browser_download_url": "[^"]*' | grep -o '[^"]*$' | grep ".AppImage")  && wget "$DOWNLOAD_URL" -O /tmp/Moonlight-downloaded.AppImage  && chmod a+x /tmp/Moonlight-downloaded.AppImage' returned a non-zero code: 1

if I switch this Dockerfile to bookworm/-slim image - it works as expected. If I will try to build the following Dockerfile on my PC - everything works.

Not sure what the cause of it is. I tried to reinstall Docker on my LibreELEV system and run docker system prune -a - didn't help

RPI4 OSMC HW acceleration

Hardware decoders are not detected in moonlight-qt on RPi 4 (4 GB) running the latest OSMC Buster & Bullseye builds.

To reproduce setup your RPI client using the following guide.

In summary:

  • clean install of latest OSMC distro (Bullseye 2022-09-01 or Buster 2022-03-01 images)
  • setup the config-user.txt with the following properties:
    • add gpu_mem=128
    • add dtoverlay=rpivid-v4l2
    • leave dtoverlay=vc4-kms-v3d (despite the moonlight docs, see note below)

Notes:

  • adding dtoverlay=vc4-fkms-v3d will prevent OSMC / Kodi 19 from booting, so thats not an option.
  • adding H264_DECODER_HINT=h264_v4l2m2m DRM_FORCE_DIRECT=1 moonlight-qt didn't seem to do anything 😢

These are screenshots from a Windows client, but I intend to run the exact same configuration on the RPi.

moon1
moon-2

Moonlight Logs:

Platform 'aarch64' running 'osmc' detected...
Running without window manager...
Detected resolution 3840,2160...
Using Qt scale factor 1.28...
Using ALSA for audio output...
Custom ALSA audio device: 'hdmi:CARD=vc4hdmi0,DEV=0'
Using Kodi hooks for osmc...
--- Starting Moonlight ---
error: XDG_RUNTIME_DIR not set in the environment.
00:00:00 - Qt Info: Unable to detect Wayland or X11, so EGLFS will be used by default. Set QT_QPA_PLATFORM to override this.
00:00:00 - Qt Info: Setting display mode by default. Set QT_QPA_EGLFS_ALWAYS_SET_MODE=0 to override this.
00:00:00 - Qt Warning: QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
00:00:00 - SDL Info (0): Compiled with SDL 2.24.0
00:00:00 - SDL Info (0): Running with SDL 2.24.0
00:00:00 - Qt Info: No translation available for  "C"
00:00:00 - Qt Warning: qrc:/gui/main.qml:12:1: QML ApplicationWindow: ToolTip must be attached to an Item
00:00:00 - Qt Info: Found "gamecontrollerdb.txt" at "/home/osmc/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-home/.cache/Moonlight Game Streaming Project/Moonlight/gamecontrollerdb.txt"
00:00:00 - SDL Info (0): Loaded 213 new gamepad mappings
00:00:01 - SDL Warn (0): Failed to create test window with platform flags: Can't load EGL/GL library on window creation.
00:00:01 - SDL Error (0): Failed to create window for hardware decode test: Can't load EGL/GL library on window creation.
00:00:01 - Qt Info: Found "gamecontrollerdb.txt" at "/home/osmc/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-home/.cache/Moonlight Game Streaming Project/Moonlight/gamecontrollerdb.txt"
00:00:01 - SDL Info (0): Loaded 213 new gamepad mappings
ioctl (GFEATURE): Input/output error
00:00:01 - Qt Warning: mDNS is disabled by user preference
00:00:02 - SDL Info (0): Captured Qt EGLFS DRM master fd (legacy): 5
00:00:02 - Qt Debug: Current Moonlight version: "4.2.1"
00:00:02 - Qt Info: Downloaded updated gamepad mappings
00:00:02 - Qt Info: Latest supported GFE server: "99.99.99.99"

crash when using kms driver libreelec 10.3 rpi4

when running LE 10.3 on RPi 4 the whole system system crashs when I start a stream.

then gui works fine, but when start a stream the rpi goes blackscreen and dies.

when running running with fkms driver the stream works but without audio and no hdmi-cec

where can i find the right log?

CoreELEC support

Hi,

Is there any possibility of a version for CoreELEC (ODROID-C4)?

No audio with 0.14.0

Hello again,
After installing the build everything went fine, but then I just restarted my pi and tried streaming again, and now I cannot get my audio to work. I do have a non-default audio device selected in kodi's setting (and I tried all ALSA devices), but cat /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt.log says:

ALSA lib /build/build.LibreELEC-RPi4.aarch64-12.0-devel/build/alsa-lib-1.2.10/src/pcm/pcm.c:2675:(snd_pcm_open_noupdate) Unknown PCM sysdefault|vc4-hdmi-0 ()
00:00:15 - SDL Error (0): Failed to open audio device: ALSA: Couldn't open audio device: No such file or directory
00:00:15 - SDL Info (0): Audio channel count: 6

I think this is the whole relevant part, everything else also seems to work just fine. But if you need the whole log let me know (as well as if I can try anything here). If I select a different output the error is adapted accordingly.

Xbox controller working in Kodi, but not in Moonlight

Hi,

On LibreELEC 10.4 on an Rpi4, I installed the xpadneo driver, which was not easy. My Xbox Series X controller is recognized on Kodi, I get the rumble and I can navigate in Kodi with the controller. On Moonlight however, the controller is unresponsive. In Moonlight / desktop, I also tried to launch the Xbox accessories util and it reports no controller.

The controller stays on when I'm on Moonlight and as soon as I quit and get back to Kodi, it's working again in Kodi.

I have same results with turning the gamepad on before launching Moonlight, and after.

Moonlight works fine with a wireless keyboard with touchpad and USB dongle.

I've a linux box with Debian, xpadneo and moonlight-qt and my controller works with it.

I didn't find any useful things in the Kodi log: https://paste.libreelec.tv/fancy-shark.log

Any idea here?

Support for x86_64

Hi there!

I've been looking for a solution for running Moonlight on my Intel's NUC Mini-PC and just recently found out your plugin. This one would have been great, but since I'm running Kodi on x86_64 architecture the plugin would not have worked for me. However since this seems to be the best solution I've seen I thought I would try to port it to work on my processor architecture.

After a few re-attempts I now have a version that works fine on x86_64 LibreELEC. The changes are here:
jhakonen/plugin.program.moonlight-qt@main...x86_64

Moonlight offers AppImage for x86_64 architecture so my code pulls that, includes missing .so files (like yours do) and then re-packages the AppImage. This appears to make it quite easy to run Moonlight as there's less paths to set in env variables. In addition I've added code that picks audio output device from Kodi's settings and configures Moonlight to use the same device.

The changes just replace the existing code so the plugin doesn't work anymore for PI 4. I would need to refactor the code so that x86_64's and PI 4's functionality would co-exist at same time.

But, before I attempt that, would you consider accepting this support for x86_64 to your plugin? If yes I can try to do the required refactoring and then make a proper PR.

Audio doesn't work unless I start with `PULSE_SERVER=none`

On my RPI4 running LE 10, audio only works when I run moonlight via ALSA. Pulseaudio seems to be running but Kodi is not configured to use it. It seems Moonlight tries to use pulse despite that.

There should be an option to choose between PA/ALSA.

LibreELEC 12 silently failing to launch moonlight-qt

Hey there,

It seems like an update of LibreELEC 12 broke this addon for some reason I cannot completely figure out.

Using the latest LibreELEC 12 nightly, the addon silently fails while trying to source /etc/profile. I tracked it down a bit and the failure occurs while sourcing /etc/profile.d/99-kodi.conf.
Then I looked for changes to this file in recent time and found this commit:
LibreELEC/LibreELEC.tv@065d3f5

And indeed, if I manually revert that commit everything works as intended. Using shell I can however source /etc/profile, so I sadly do not know why it fails using the addon.

Maybe you have a better idea about this stuff?

Kodi 20+ missing addon under 'Games' section in main menu

After updating to OSMC v2023.06-1 (Kodi v20.1) the v3.0.0 of this plugin is no longer listed in the main menu 'Games' section.
A workaround is to add the addon under the favorites section and launch it from there.
Most probably Kodi changed the addon configuration requirements since v20+?

using wrong build path on wandboard (NXP Platform)

When installing moonlight-qt it seems that the script is using the generic build path for x86 systems.

sh ../bin/get-platform.sh
Platform 'nxp' running 'libreelec' detected, using platform generic...

But NXP (Wandboard Quad) is an arm device

then an error appears: cp stat not found
/usr/lib/x86_64-linux-gnu/libICE.so

trying to use the rpi build scripts by simply renaming the folders worked for compilation.

but when I try to start moonlight nothing happens. Kodi is killed successfully, then I have a black screen for a short time period and after that kodi relaunches.

when running launch-moonlight-qt.sh manually kodi is killed and this error appears on commandline

Platform 'nxp' running 'libreelec' detected, using platform generic... Loading LibreELEC profile for setting up environment... Using custom libraries from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib... Using Qt library from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib/qt5... Running without window manager... Detected resolution 1920,1080... Using Qt scale factor 0.64... Using Kodi hooks for libreelec... --- Starting Moonlight --- ./moonlight-qt: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

uname -m returns "armv7l"

copying libssl.so from /usr/lib/ to moonlight-qt/lib/libssl.so.1.1 does the job for libssl

Now im stuck. copying libvchiq_arm.so from a raspberry results in this.
But after that I get:
LibreWBQ:~/.kodi/addons/plugin.program.moonlight-qt/resources/bin # sh ./launch_moonlight-qt.sh Platform 'nxp' running 'libreelec' detected, using platform armv7l... Loading LibreELEC profile for setting up environment... Using custom libraries from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib... Using Qt library from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib/qt5... Running without window manager... Detected resolution 1920,1080... Using Qt scale factor 0.64... Using Kodi hooks for libreelec... --- Starting Moonlight --- ./moonlight-qt: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory

0.3.1 does not work on my device

How can I resolve this issue? I've tried LibreELEC 11 Generic, LibreELEC 11 Legacy Generic, and LibreELEC 10, but none of them worked.

Here's my log

LibreELEC 10 Generic + plugin.program.moonlight-qt 0.3.1

Platform 'generic' running 'libreelec' detected...
Loading LibreELEC profile for setting up environment...
Using custom libraries from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib...
Using Qt library from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib/qt5...
Running with window manager...
Using Kodi hooks for libreelec...
--- Starting Moonlight ---
00:00:00 - Qt Info: Could not load the Qt platform plugin "xcb" in "/storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib/qt5/plugins/" even though it was found.
00:00:00 - Qt Fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Aborted

LibreELEC 11 Legacy Generic + plugin.program.moonlight-qt 0.3.1

Platform 'generic' running 'libreelec' detected...
Loading LibreELEC profile for setting up environment...
Using custom libraries from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib...
Using Qt library from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib/qt5...
Running with window manager...
Using Kodi hooks for libreelec...
--- Starting Moonlight ---
00:00:00 - SDL Info (0): Compiled with SDL 2.25.0
00:00:00 - SDL Info (0): Running with SDL 2.25.0
00:00:00 - Qt Info: No translation available for "C"
00:00:00 - Qt Info: No existing credentials found
00:00:00 - Qt Info: Wrote new identity credentials to settings
00:00:00 - Qt Warning: qrc:/gui/main.qml:12:1: QML ApplicationWindow: ToolTip must be attached to an Item
00:00:01 - Qt Info: Found "gamecontrollerdb.txt" at ":/data/gamecontrollerdb.txt"
00:00:01 - SDL Info (0): Loaded 225 new gamepad mappings
00:00:01 - SDL Info (0): V-sync disabled
libva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_17
libva error: /usr/lib/dri/iHD_drv_video.so init failed
libva info: va_openDriver() returns 1
00:00:01 - SDL Info (0): Trying fallback VAAPI driver names
libva info: VA-API version 1.17.0
libva info: User environment variable requested driver 'iHD'
libva info: Trying to open /usr/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_17
free(): double free detected in tcache 2
Aborted

Any hope for a Raspbian port?

Hello!

This plugin looks really great, and a quick test on LibreELEC looked very promising.

However, for various compatibility reasons, I need to stick with Raspbian OS Lite on my RasPi.

Is there any hope that this plugin could be ported to that platform? I guess it should mainly be required to disable functions, as Moonlight-QT runs on Raspbian without any of the Docker magic. One challenge would be that the latest official KODI version for Raspbian is still 18.7, which, if I understand correctly, still uses Python 2.

I tried doing it myself, but I am afraid there are too many things about this plugin that I don't fully understand...

Thank you very much, and cheers!

Crash when resolution is 1440p

I’m running LibreELEC 10.0.4 on a Raspberry Pi 4.

When I set the EGL-resolution to 1440p, moonlight-qt seems to just crash as soon as the client starts. The issue doesn’t appear when I force 1080p, or when I set it to Default and let it run in 4k. The log doesn’t produce anything useful but I’ll add it to the issue if you want.

LibreELEC 9.x support?

I guess I already know the answer but why not ask ;)

Is it possible to backport this addon to 9.x?

ALSA pcm.c:8570:(snd_pcm_recover) underrun occurred

I wanted to try using 5.1 audio streaming (Surround).
I cannot seem to get it working.
Stereo works great.

I am running LibreElec 11
Linux LibreELEC11 6.1.19 #1 SMP Mon Mar 20 16:46:57 PDT 2023 x86_64 GNU/Linux
On Regular x86 hardware with AMD Radeon R5-230 GPU (HDMI)

The log mentions ALSA underrun.
00:00:22 - SDL Info (0): Starting audio stream... 00:00:22 - SDL Info (0): Desired audio buffer: 480 samples (5760 bytes) 00:00:22 - SDL Info (0): Obtained audio buffer: 480 samples (5760 bytes) 00:00:22 - SDL Info (0): Audio stream has 6 channels 00:00:22 - SDL Info (0): done 00:00:22 - SDL Info (0): Starting input stream... 00:00:22 - SDL Info (0): done 00:00:22 - SDL Info (0): Qt UI screen is at (0,0) 00:00:22 - SDL Info (0): SDL found matching display 0 ALSA lib /mnt/datadev/LibreELEC/LibreELEC.tv/build.LibreELEC-Generic-legacy.x86_64-11.0.1-DualAudio-r12/build/alsa-lib-1.2.8/src/pcm/pcm.c:8570:(snd_pcm_recover) underrun occurred ALSA lib /mnt/datadev/LibreELEC/LibreELEC.tv/build.LibreELEC-Generic-legacy.x86_64-11.0.1-DualAudio-r12/build/alsa-lib-1.2.8/src/pcm/pcm.c:8570:(snd_pcm_recover) underrun occurred ALSA lib /mnt/datadev/LibreELEC/LibreELEC.tv/build.LibreELEC-Generic-legacy.x86_64-11.0.1-DualAudio-r12/build/alsa-lib-1.2.8/src/pcm/pcm.c:8570:(snd_pcm_recover) underrun occurred 00:00:23 - SDL Info (0): Found display mode with desktop resolution: 1920x1080x60

RPI 4 Libreelec Kodi

Hi,
I've installed and used the add-on successfully once already. But after I while when I tried it again it didn't work.
When I start the add-on I can only see a black screen. Noting more.

I tried reinstalling the add-on and docker but still the same.
It's not even asking for configuration (after fresh install with previous uninstall including user data removal).
Kodi.log doesn't seem to log anything relevant..

Any Idea what could cause this behaviour?

UI scaling issues

Hello!

The Moonlight UI seems to be scaled weirdly, as if it's running at 4K (on a 1080p monitor) and at 50% scale, so everything looks tiny, especially the icons of the top bar.

I've tried to use the new "EGL resolution" option, but that didn't change anything. I haven't been able to launch Moonlight from a terminal to see if it's related to the plugin or Moonlight itself.

I'm running LibreELEC 11.0.4 (downloaded from the Raspberry Pi imager), which is apparently running Kodi 20.2.0. I'm running version 0.4.3 of the plugin.

Moonlight Kodi_2024-01-13_13-52-27
Moonlight Kodi_2024-01-13_13-52-52
Moonlight Kodi_2024-01-13_13-52-41

No access to settings with keyboard or mouse

Hi there,

I installed the plugin and works wonderful. Thank you! The only issue i have is that i can not access the config menu of moonlight (the gear in the up-right corner) either with keyboard or mouse. I can only move with keyboard arrows between games and select them. Mouse not working at all. Both devices are connected via usb.

Rpi4 - Libreelec system

Raspberry Pi 3b crash

Running on raspberry 3b causes gui to crash and web remote control to stop.

Kodi.log -> https://pastebin.com/CgejGvQC

Should this program run at all on other raspberry versions? If not, can you add support? And then moonlight-embedded is not supported from version Kodi 10.0, and there are no other ways to stream to raspberry 3

French translation

Hello, I would like to contribute a translation for French (France) to this plugin. I have already translated the strings, but it seems like there's also Crowdin metadata, and I want to make sure it is correct before creating a pull request.

# Kodi Media Center language file
# Addon Name: Moonlight
# Addon id: plugin.program.moonlight-qt
# Addon Provider: veldenb
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: veldenb\n"
-"Language: en_GB\n"
+"Language: fr_FR\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Crowdin-Project: pluginprogrammoonlight-qt\n"
"X-Crowdin-Project-ID: 457400\n"
-"X-Crowdin-Language: en-GB\n"
+"X-Crowdin-Language: fr\n"
"X-Crowdin-File: strings.po\n"
"X-Crowdin-File-ID: 2\n"
"Project-Id-Version: pluginprogrammoonlight-qt\n"
"Content-Type: text/plain; charset=UTF-8\n"
-"Language-Team: English, United Kingdom\n"
-"PO-Revision-Date: 2021-05-24 14:48\n"
+"Language-Team: French\n"
+"PO-Revision-Date: 2021-07-12 14:00\n"

Streaming in 1080p on 4k TVs

Dear maintainers,

The value of QT_SCALE_FACTOR in this commit d28988e broke a feature (at least in my setup) added by the moonlight-qt team in 3.2.0 that allows the moonlight gui to output a signal in the same resolution as the game stream.

I do have a 4k TV, but want to output the game stream in 1080p for two reasons:

  • 4k is at 30hz --> framecap at 30fps
  • Upscaling from 1080p to 4k is done by the media device (in my case a RPI4). As TVs do a (way) better job in upscaling, I want the TV to process a 1080p signal and to perform the upscaling to 4k internally.

A QT_SCALE_FACTOR of 0.93 as defined in bootstrap_moonlight.sh for 1080p lets moonlight-qt crash (without any meaningful logs), whereas a value of 1 seems fine (except for a broken UI, but hey, the stream works).

Please see some logs and the disussion on the topic at the moonlight-qt repo: moonlight-stream/moonlight-qt#645

Note that this is FYI, i do not expect anyone to take action. As there is a workaround, i am super happy with the addon. It is the first no-compromises solution as everything works (starting moonlight from Kodi, streaming in 1080p@60hz, working game controllers, hvec, etc.). Thank you very much for your effort!

Can't close the stream

I'm using the latest provided plugin for moonlight (0.4.3) with libreelec 11.0.5 on Pi4. Host is Windows PC with sunshine 0.21.0 to stream stuff. I have BT keyboard+mouse combo connected to my Pi4 device.
My issue is that when I stream the full desktop, there is no option to close the stream anymore. Ctrl+Alt+Shift+Q doesn't work and none of the other moonlight shortcuts work as well. At the same time all windows shortcuts like Alt+Tab, Ctrl+Shift+ESC, etc work just fine. I tried to check if this could be connected to the option for moonlight to capture system shortcuts and send them to the host but this option is enabled and greyed out by default and I can't change it.

Can't install

Hello.

Today I tried to update Moonlight-QT to the current version under LibreElec 11.0.3, but I always get an abort with an error message. A new installation did not help either. Docker is up to date and running.
20231120_130136
20231120_130151
20231120_130203
20231120_130211

Feature Request: Support custom provided moonlight

I really would like to have a nice moonlight launcher in kodi, but i would prefer that this plugin could just launch a existing moonlight-qt installation without all the magic to install a version (since i have installed moonlight through my distros package manager anyways).

ideally there would be a flag if moonlight is distributed by this script, or if just a existing moonlight is assumed and used.

Surround 7.1 channel mapping

Hello, I see that this plugin has a configuration file asoundrc used for surround sound channel mapping.

Is this configuration tested and verified that it works as is?
I am asking since I have an issue with 7.1 surround channel mapping, and was wondering if you can help me diagnose the issue.

Specifically, when I toggle Moonlight-QT GUI config to use 7.1 the sound is distorted and generally broken.
I have also added a comment in this issue HERE to discuss and further steps, but I am not sure if the issue is on the Moonlight-QT side or due to this plugin's default asoundrc.

Maybe my configuration requires different channel indexes for asoundrc's ttable? I have newer had to alter ALSA configs, as OSMC (distro that I use) has worked out-of-the-box for 7.1, so the issue is present only when using Moonlight.

Any feedback would be appreciated.

Crash on LibreElec 10.95.0 (Kodi 20) due to missing libssl1.1.so and no HW-decoding

In LibrELEC 10.95.0 which is running Kodi 20, Moonlight will cause Kodi to restart because libssl.so.1.1 cannot be found.

I have tried adding libssl1.1 to the Dockerfile with no luck. I'm not sure "where" libssl is meant to be coming from, I'd have figured in the container?

Jan 31 19:51:36.842627 vulcan systemd[1]: Started run-r2d9383b5a645470db5c281f73948177d.service.
Jan 31 19:51:36.844040 vulcan kodi.sh[16560]: Running as unit: run-r2d9383b5a645470db5c281f73948177d.service
Jan 31 19:51:36.857178 vulcan bash[16564]: Platform 'rpi' running 'libreelec' detected...
Jan 31 19:51:36.857178 vulcan bash[16564]: Loading LibreELEC profile for setting up environment...
Jan 31 19:51:36.876088 vulcan bash[16564]: Using custom libraries from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib...
Jan 31 19:51:36.876088 vulcan bash[16564]: Using Qt library from /storage/.kodi/userdata/addon_data/plugin.program.moonlight-qt/moonlight-qt/lib/qt5...
Jan 31 19:51:36.876379 vulcan bash[16564]: Running without window manager...
Jan 31 19:51:36.881990 vulcan bash[16564]: Detected resolution 1920,1080...
Jan 31 19:51:36.881990 vulcan bash[16564]: Using Qt scale factor 0.64...
Jan 31 19:51:36.900378 vulcan bash[16564]: Using Kodi hooks for libreelec...
Jan 31 19:51:36.939234 vulcan systemd[1]: Stopping kodi.service...
Jan 31 19:51:45.546674 vulcan systemd[1]: kodi.service: Deactivated successfully.
Jan 31 19:51:45.547065 vulcan systemd[1]: Stopped kodi.service.
Jan 31 19:51:45.547539 vulcan systemd[1]: kodi.service: Consumed 3min 58.948s CPU time.
Jan 31 19:51:45.549123 vulcan bash[16564]: --- Starting Moonlight ---
Jan 31 19:51:45.553622 vulcan bash[16564]: ./moonlight-qt: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
Jan 31 19:51:45.573131 vulcan systemd[1]: Starting kodi.service...
Jan 31 19:51:45.584988 vulcan systemd[1]: Started kodi.service.
Jan 31 19:51:45.590142 vulcan systemd[1]: run-r2d9383b5a645470db5c281f73948177d.service: Deactivated successfully.

Problems while streaming - HEVC stream shows vertical tiles from LibreELEC 9.97.1

Hi there,
I don't know if its ok to open an issue here, but since libreelec is not officially supported by the moonlight-qt maintainers I decided to give it a try. If installed this plugin moonlights installs just fine and I'm able to pair the device. All the games and applications are visible just fine. But if i try start streaming I get a vertical teared picture like this:
PXL_20210727_143046826 MP
Do you have any idea what to do? I tried to modify /boot/config.txt, as outlined in the moonlight-qt wiki to enable HEVC, but /boot/config.txt does not exist in libreelec.

Greetings

Launcher Support for AKL

AKL has a gamestream plugin( works great), this scrapes all artwork and metadata from sunshine/gamestream. It will also launch moonlight on windows and android, but not librelec. Is there anyway that an akl launcher can be added for your build. Your addon does a great job of setting up moonlight-qt.
https://github.com/chrisism/script.akl.nvgamestream

`generic_git` Dockerfile can't be built

Steps to reproduce:

  1. Copy on local PC https://github.com/veldenb/plugin.program.moonlight-qt/blob/main/resources/build/generic_git/Dockerfile
  2. docker build .

Expected

Successful build

Got

E: Unable to locate package libfreetype-dev
The command '/bin/sh -c /bin/bash -c /opt/scripts/install-base-deps.sh &&     apt-get install -y --no-install-recommends libwayland-dev wayland-protocols libva-dev libvdpau-dev &&     apt-get clean -y &&     rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100

Additional info

This dependencies installer script seems to cause an error after the #72ec840 commit

if [ "$DISTRO" != "buster" ] && [ "$DISTRO" != "bionic" ]; then
    apt-get install -y libfreetype-dev
else
    apt-get install -y libfreetype6-dev
fi

Possible solution

DISTRO variable must be set up to buster, since generic_git Dockerfile based on debian:buster image

ENV DISTRO=buster

Generic x86_64 device: Qt Warning: Could not find the Qt platform plugin "eglfs" in ""

General info

  • Running kodi-gbm as a standalone application with no X/wayland
  • plugin.program.moonlight-qt version: 0.4.1 (but also tried 0.4.0 and 0.3.1)
  • System: debian based (actually on a proxmox ve host, 6.2.16-19-pve #1 SMP PREEMPT_DYNAMIC PMX 6.2.16-19 (2023-10-24T12:07Z) x86_64 GNU/Linux
    • I know that I am not technically fulfilling the stated requirements, but maybe we can figure out what the problem is here
  • output of get_platform.sh
    Platform 'x86_64' running 'debian' detected, using platform generic...

Behaviour

After trying to start the plugin, kodi crashes.

Expected behaviour

Moonlight-qt should run/configure/update itself

Further information

  • It seems that the qt-bootstrapping does not work. The eglfs plugin is not found

  • kodi relevant logs:

Launching moonlight-qt: systemd-run --user --setenv=ADDON_PROFILE_PATH="/var/lib/kodi/.kodi/userdata/addon_data/plugin.program.moonlight-qt" --setenv=PULSE_SINK="Default" bash /var/lib/kodi/.kodi/addons/plugin.program.moonlight-qt/resources/bin/launch_moonlight-qt.sh
  • plugin logs:
Platform 'x86_64' running 'debian' detected, using platform generic...
Running without window manager...
Detected resolution 1920,1080...
Using Qt scale factor 0.64...
Using Kodi hooks for debian...
--- Starting Moonlight ---
00:00:00 - Qt Info: Unable to detect Wayland or X11, so EGLFS will be used by default. Set QT_QPA_PLATFORM to override this.
00:00:00 - Qt Info: Setting display mode by default. Set QT_QPA_EGLFS_ALWAYS_SET_MODE=0 to override this.
00:00:00 - Qt Warning: Could not find the Qt platform plugin "eglfs" in ""
00:00:00 - Qt Fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb.

bootstrap_moonlight-qt.sh: line 148: 1037556 Aborted                 ./moonlight-qt "$@"
Running as unit: run-rae3c3b6b545c4061a396636cc801de60.service

Ideas for solution

I am not sure if the required qt plugin eglfs is supposed to be installed by bootstrap_moonlight_qt.sh, or if it looking for system packages. If the latter, I might simply need to install some additional packages or manually build qt?

Startup problem on libreelec 10.0, generic x64

Hi,
this addon seems to have installed correctly, kodi gives no errors.
However, trying to start moonlight on libreelec, the OS soft resets and does not start the program.

I checked via ssh, and there is no docker container running anything moonlight related.

Small and no pretty fonts

Hello,

Thanks for this amazing work.
It works perfectly with LibreElec 10.0.0 on a Raspberry Pi 4 albeit for a very small issue : the fonts are very tiny in Moonlight GUI and almost impossible to read on a 40 inches 1080p TV, particularly in settings. Moonlight launched from X11 with raspbian did not have the same issue.
It should be missing some font or parameter !?

Best regards.

Request: Coreelec support

I can install the addon, it says its installed succesfully, but doesnt run on coreelec. Did some toying around:

CoreELEC:~/.kodi/addons/plugin.program.moonlight-qt/resources/bin # bash get-platform.sh
Platform 'amlogic-ce' running 'coreelec' detected, using platform generic...

CoreELEC:~/.kodi/addons/plugin.program.moonlight-qt/resources/bin # bash launch_moonlight-qt.sh
Platform 'amlogic-ce' running 'coreelec' detected, using platform generic...
Running without window manager...
Detected resolution 1920,2160...
Using Qt scale factor 0.77...
--- Starting Moonlight ---
bootstrap_moonlight-qt.sh: line 207: ./moonlight-qt: cannot execute binary file: Exec format error

CoreELEC:/.kodi/addons/plugin.program.moonlight-qt/resources/bin # bash bootstrap_moonlight-qt.sh
Platform 'amlogic-ce' running 'coreelec' detected, using platform generic...
Running without window manager...
Detected resolution 1920,2160...
Using Qt scale factor 0.77...
mkdir: can't create directory '/moonlight-home': Read-only file system
CoreELEC:
/.kodi/addons/plugin.program.moonlight-qt/resources/bin #

Dont know why its strike-through letters....

Is there a way to make this work?

Can't quit Moonlight app itself

I'm pretty sure I'm missing something very obvious here but... I managed to successfully stream games from the PC using this add-on.

I'm using LibreELEC 11.0 (Kodi 20.3, Linux Kernel 6.1.x) on a Raspberry Pi4.

The problem is I can't quit the Moonlight app itself.

The 4th point in the README.md states "Exit Moonlight and you will be returned to Kodi". But I can't do that. I need to power down the Raspberry in order to get back to Kodi.

How do I quit the Moonlight app?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.