moonlight: request for comments and testing
-
(Big) Update
So, I finally got some time in my hands and decided to work on the received feedback to improve the scriptmodule. I re-designed the GUI menu to support most of your requests, including the management of the game config files generation and configuring global resolution and stream bitrate settings.
General Improvements to the GUI
- Added support to slugify file names when generating game config files. Slugifying ensures the filenames use valid characters for windows-based filesystems such as FAT32 or remote SMB mounts.
- Added support to configure global resolution settings, including standard 1080p30/60, 720p30/60 and also completely custom resolutions.
- Added support to configure global stream bitrate settings, including standard 20000, 10000, 5000 Kbps and also completely custom bitrates.
- The main menu now has three sub-menus (one for generating game config files, one for resolution settings and a third for stream bitrate settings).
- All the menus remember your settings, e.g. the remote address and config files generation settings. This scriptmodule-specific settings are stored in
$configdir/all/moonlight/scriptmodule.cfg
.
New Main Menu
New Remote Apps Submenu
- Overwrite existing files: NO=skip config files already existing, YES=always re-write game config files.
- Wipe existing config files: NO=don't touch your files in
$romdir/steam
, YES=delete all config files before generating new config files. This is useful for a complete re-sync of the games configured in the remote computer. - Config filename mangling: NONE=use the app names directly for the config file names, SLUGIFY=slugify the app names and use that for the config file names, WINDOWS=only use Windows-compatible characters from the app names.
New Global Resolution Submenu
- Unset (use default): this setting removes any custom/forced resolution setting.
- 1-4: set standard resolution setting.
- Custom: set any custom resolution (WIDTH x HEIGHT / FPS).
The resolution settings are set in the global config file in
$configdir/all/moonlight/global.conf
using thewidth
,height
andfps
moonlight options, therefore they are automatically loaded by all the generated config files. However, if you further re-fine resolutions per-game they take precedence over the global settings.New Stream Bitrate Submenu
- Unset (use default): this setting removes any custom/forced stream bitrate setting.
- 1-3: set standard stream bitrate setting.
- Custom: set any custom stream bitrate (in Kbps).
The stream bitrate settings are set in the global config file in
$configdir/all/moonlight/global.conf
using thebitrate
moonlight option, therefore it is automatically loaded by all the generated config files. However, if you further re-fine stream bitrate per-game they take precedence over the global settings.
To try these new improvements, simple re-patch the experimental scriptmodule. Let me know if these solve your usability suggestions @Silent, @seriously24 !
@buzz I think the scriptmodule is now quite mature and should be fine to integrate into RetroPie. We can finally retire the obsolete limelight module. I will give some extra time for users to test the improved GUI and then submit.
Also, I made two utility functions that maybe are worth promoting to the
helpers
module:_slugify_moonlight
to slugify strings into safe filenames and_bfmt_moonlight
to format boolean values into YES/NO for printing. Let me know if you have interest for these and I will move them to the helpers library.Happy game streaming!
Edit: now that I was at it, added a new submenu to configure stream bitrate settings as well :)
Edit2: improved the filename mangling functionality, added "windows-compatible" option in addition to "slugify". -
@hhromic said in moonlight: request for comments and testing:
Also, you may want to know that Moonlight gets properly terminated by Multi Switch Shutdown Script, but terminating it this way does not send quit message to the host. I'm not sure if it's a bug or expected behaviour, but I'll just patch up the script on my end to do that for me!
Umm this seems like a bug. If moonlight is terminated using SIGTERM it should gracefully finish (and send the quitapp request). I just tested and is not responding to the SIGTERM, I will debug and submit a PR upstream to fix this.
@Silent I found out the problem now. Indeed it was a bug in the code. I submitted already a PR upstream and once merged, Moonlight will gracefully terminate when receiving SIGTERM signals, for example from the switch shutdown script.
This means it will send the quit-app request on this situation too.Thanks for reporting this!
-
@hhromic Nice updates, thank you! I'll make sure I test them soon, after I've restored the SD card to pre-sixaxis changes (due to new changes I don't want to uninstall, but rather start fresh) and then will give those a spin.
-
@Silent the SIGTERM issue is now fixed upstream, although not from my PR as a better solution was proposed by the author :D.
Anyway, recompile moonlight and it should now gracefully exit from the shutdown script. -
Good! Will try to test it tonight.
Also FYI I also posted an issue about this DS3 mapping on SDL bugtracker, but it's hard to tell when will they react to that.
-
@hhromic I just gave the newest scriptmodule a try and slugify option is a bit disappointing - while of course it works as intended and ThegamesDB handles these names relatively well, MobyGames seems terrible at it (so far I have 0 matches for games which names consist of multiple words). Will try IGDB next and report.
I think I'll stick to non-slugified names for now.
-
@hhromic thanks for your work on this. I'm happy to accept this when you are. The old limelight module is so out of date I'm keen to remove it.
In regards to splitting out functions. Certainly may be useful, but I reckon accepting first and can refactor out later if useful for other modules.
Thanks again! Looks excellent.
-
Can be used with steam link? I think they are using same rom folder. Your script works awesome! I asked just for curious.
-
@llamadestroyer said in moonlight: request for comments and testing:
Can be used with steam link? I think they are using same rom folder. Your script works awesome! I asked just for curious.
Yes it can be used at the same time. Steam Link is installed under "ports" (and doesn't use any "roms") while Moonlight is installed as an "emulator" for the "steam" platform (using ".ml" "roms"). These two are 100% independent.
Thanks for the feedback, glad you like the scriptmodule!
-
@Silent said in moonlight: request for comments and testing:
@hhromic I just gave the newest scriptmodule a try and slugify option is a bit disappointing - while of course it works as intended and ThegamesDB handles these names relatively well, MobyGames seems terrible at it (so far I have 0 matches for games which names consist of multiple words). Will try IGDB next and report.
I think I'll stick to non-slugified names for now.
Oh that's a boomer to hear about the slugify solution. May I ask how exactly are you scraping these? I might give it a try myself to sort out what can be further done. Perhaps after slugifying changing "-" to " " might help, but I don't want to introduce more noise to the filename mangling if not necessary. Thanks for testing!
-
@hhromic said in moonlight: request for comments and testing:
May I ask how exactly are you scraping these?
Exclusively via Skyscraper. I'm yet to try the
aliasMap
for those - seems like it'd be a good solution, but I think changing-
to -
Hi there Ive just installed moonlight for the first time on my retro pie and got everything setup fine right up to after I generated the configs all my games list and I restart retropie, but I'm not seeing any new menu items in emulation station and nothing but kodi in ports have I missed a step somewhere?
I've read the instructions a few times and I don't think I missed anything.
Any help would be greatly appreciated
Thank you
-
@jackalblood thanks for testing the scriptmodule and confirming it's working fine for you (at least until game file generation).
The scriptmodule creates a "Steam" system where it places all the moonlight config files (with
.ml
extension), contrary to Kodi or Steam that only have a single entry in the "Ports" system. You should be able to find a "Steam" system in your emulationstation alongside others such as "SNES" or "NES".Maybe you are using a theme that doesn't support this system? In that case you should still be able to find it I think. If you are not using the default theme, can you switch to the Carbon included theme just to check if it's your theme or something else?
-
@hhromic I was actually using carbon already.
However I did get the menu item to show with the scripts present by running this script after your embedded one.
[link text]https://github.com/TechWizTime/moonlight-retropie(link url)
This made the menu item appear and the scripts work perfectly although streaming performance sucked as I was away and using VPN.
All in all thanks so much for your work I've tried everything to get moonlight working in the past (hence my remembering the above script)
-
@Silent I improved the filename mangling functionality now. The option is no longer called "slugify" alone but more general "file name mangling". There are three options now for it: NONE, SLUGIFY and WINDOWS. The latter is less agressive than "slugify" and only removes/replaces characters to make the names windows-compatible (SMB shares and FAT32 filesystems). Give it a try and see if it improves scraping for you. This should be the last change before submitting to official RP :)
@jackalblood said in moonlight: request for comments and testing:
However I did get the menu item to show with the scripts present by running this script after your embedded one.
[link text]https://github.com/TechWizTime/moonlight-retropie(link url)
This made the menu item appear and the scripts work perfectly although streaming performance sucked as I was away and using VPN.Umm that's strange. Maybe you are using a custom
es_systems.cfg
that overrides the system one in/etc/emulationstation
?I would strongly advise you to re-install moonlight using this scriptmodule here because the TechWiz version uses an outdated pre-built Moonlight binary.
Thanks for testing and the positive feedback, much appreciated!
-
Update
Recently, preliminary rumble support was added to Moonlight in upstream!
To give it a try, just re-build Moonlight from source using this scriptmodule :) -
@hhromic Thanks! Now scraping works well as usual :D
I even managed to scrape streamed PS2 games fromscreenscraper
by giving them sha1 hashes manually, good stuff :) -
@Silent I'm glad it's finally working good for you and probably others too!
I think now is time to graduate the scriptmodule to the Official RP repo :)
Any other further issue you would like to report? -
Seems all good now! I was unable to get rumble working with my DualShock 3 yet, but naturally that's nothing a scriptmodule can do :D
As far as I can tell, it should be good to be merged! I am able to use it both for "steam" and "ps2" platforms just fine myself. Time to say goodbye to
limelight
. -
Hi,
I can not start steam in big picture mode, it comes back in emulationstation.my Steam.ml file:
config = /opt/retropie/configs/all/moonlight/global.conf address = 192.168.1.3
What's the problem?
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.