All Projects → lyckantropen → moonlight_hdr_launcher

lyckantropen / moonlight_hdr_launcher

Licence: MIT license
Launch anything in HDR mode using Moonlight

Programming Languages

C++
36643 projects - #6 most used programming language
python
139335 projects - #7 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to moonlight hdr launcher

cloudgamestream
A Powershell one-click solution to enable NVIDIA GeForce Experience GameStream on a cloud machine with a GRID supporting GPU.
Stars: ✭ 99 (+106.25%)
Mutual labels:  geforce-experience, moonlight, gamestream
GS-IPv6-Forwarder
Enables access to GameStream servers over IPv6 (included in Internet Hosting Tool)
Stars: ✭ 35 (-27.08%)
Mutual labels:  moonlight, gamestream
moonlight-embedded
Gamestream client for embedded systems
Stars: ✭ 1,375 (+2764.58%)
Mutual labels:  moonlight, gamestream
Sunshine
Sunshine is a Gamestream host for Moonlight.
Stars: ✭ 1,132 (+2258.33%)
Mutual labels:  geforce-experience, moonlight
Moonlight Qt
GameStream client for PCs (Windows, Mac, Linux, and Steam Link)
Stars: ✭ 2,796 (+5725%)
Mutual labels:  moonlight, gamestream
Expo-Badge
A design study for Expo badges
Stars: ✭ 22 (-54.17%)
Mutual labels:  shield
hdr10plus tool
CLI utility to work with HDR10+ in HEVC files.
Stars: ✭ 173 (+260.42%)
Mutual labels:  hdr
SerialProxy
🖱️⌨️ Arduino Input Proxying for PC (.NET Core)
Stars: ✭ 39 (-18.75%)
Mutual labels:  shield
Paperino
E-Paper display library for the Particle & Arduino family.
Stars: ✭ 35 (-27.08%)
Mutual labels:  shield
DeepHDRVideo
HDR Video Reconstruction: A Coarse-to-fine Network and A Real-world Benchmark Dataset (ICCV 2021)
Stars: ✭ 63 (+31.25%)
Mutual labels:  hdr
gradient-badge
🍭 Badge generator with color gradient support
Stars: ✭ 47 (-2.08%)
Mutual labels:  shield
MPCNC-Nano-Estlcam-Shield
Ein CNC Shield für die MPCNC in Verwendung mit Estlcam
Stars: ✭ 60 (+25%)
Mutual labels:  shield
gpu-camera-sample
High quality Image Processing software on GPU (Windows, Linux, ARM) for real time machine vision camera applications. Performance benchmarks and Glass-to-Glass time measurements. MIPI CSI cameras support. RAW2RGB processing on GPU.
Stars: ✭ 200 (+316.67%)
Mutual labels:  hdr
badgecreatr
Quickly place relevant badges at the top of your readme, stop copy pasting, start on your project
Stars: ✭ 61 (+27.08%)
Mutual labels:  shield
iltms teensy lightsaber v1
This is the code to accompany the lightsaber project at http://www.iliketomakestuff.com/make-lightsaber/ Expected hardware is listed in post (Teensy 3.2, Prop Shield, DotStar LEDs)
Stars: ✭ 28 (-41.67%)
Mutual labels:  shield
badge-generator
Magically generate Markdown badges for your docs 🛡️ 🦡 🧙
Stars: ✭ 104 (+116.67%)
Mutual labels:  shield
ParsecSoda
Parsec Soda is a custom open-source game streaming app that integrates with Parsec API and is focused in Host experience.
Stars: ✭ 135 (+181.25%)
Mutual labels:  gamestream
MT3620 Grove Shield
C library, Azure Sphere, MT3620 Grove Shield, I2C, Analog, SC18IM700, AD7992, Visual Studio 2017
Stars: ✭ 21 (-56.25%)
Mutual labels:  shield
Graphql Shield
🛡 A GraphQL tool to ease the creation of permission layer.
Stars: ✭ 3,121 (+6402.08%)
Mutual labels:  shield
oculante
A minimalistic crossplatform image viewer written in rust
Stars: ✭ 169 (+252.08%)
Mutual labels:  hdr

Moonlight HDR Launcher

This is a launcher for GameStream that mocks Mass Effect Andromeda to launch any executable from a Shield device or Moonlight with HDR support. For example, it can be used in conjunction with gamestream_launchpad to launch GOG Galaxy 2.0 in HDR mode.

It is loosely based on a solution by tmac666 on NVIDIA forums.

The installer puts the files in C:\Program Files\moonlight_hdr_launcher and modifies the GeForce Experience entry for Mass Effect Andromeda to launch the mock executable.

Installing

Download latest release here.

Unzip and launch the installer. At some point there will be a dialog window asking you to rescan for games in GeForce Experience. Only then the last part of the script can succeed. The installer will try restarting GeForce Experience. Now in Shield or Moonlight you should see the new entry. If you're not seeing it, try rebooting your PC.

Note: I haven't been able to get the cover art to work for me. If you know how to do it, please reach out.

Description

GeForce Experience recognizes Mass Effect Andromeda as a game that supports HDR and will initiate a GameStream session with HDR support if it is launched.

This software provides a mock MassEffectAndromeda.exe and patches the NvBackend cache to launch it instead of the game.

The installation does the following:

  • Creates C:\Program Files\moonlight_hdr_launcher and puts MassEffectAndromeda.exe there along with an initial configuration file.
  • Sets write permissions for all users on C:\Program Files\moonlight_hdr_launcher.
  • Caches the location C:\Program Files\moonlight_hdr_launcher in registry (HKCU/lyckantropen/moonlight_hdr_launcher).
  • Searches <user folder>\AppData\Local\NVIDIA\NvBackend\StreamingAssetsData\ for the mass_effect_andromeda folder and patches StreamingSettings.json and metadata.json (the latter only for file checksums).

The MassEffectAndromeda.exe launcher does the following:

  • Queries the registry for the install location (C:\Program Files\moonlight_hdr_launcher by default.).
  • Forces setting the current directory to the install location.
  • Creates the moonlight_hdr_launcher_log.txt log file.
  • Looks for the moonlight_hdr_launcher.ini configuration file.
  • Creates a dummy window to please GameStream when ending the session.
  • Optionally attempts to enable HDR on all connected monitors with HDR support if both options.toggle_hdr and options.wait_on_process are set to non-zero (doing so when not waiting for the process to finish would disable HDR immenently because of NVAPI unloading).
  • Launches the options.launcher_exe command as a subprocess and optionally waits for it to terminate if options.wait_on_process is set to non-zero.
  • In the event of an exception, collects crash information and uploads it to sentry.io. The data is anonymous, no unique user or machine data is transferred.

Configuration

The installer will offer a basic choice of launchers and resolutions to use as an initial configuration. Later on you can edit the file moonlinght_hdr_launcher.ini file in C:\Program Files\moonlight_hdr_launcher and modify it to your needs. These are the options:

  • launcher_exe - the command to launch
  • wait_on_process - set to 1 to wait until the launcher_exe command completes
  • toggle_hdr - set to 1 to turn on HDR on all supported monitors for the time when launcher_exe is running (set this to 1 only when a HDR supported display is connected to the gamestream host)
  • compatibility_window - create a dummy window that will get detected by GameStream and allow for ending the session gracefully
  • remote_desktop - instead of launcher_exe, simply show the desktop; you need to close the dummy window in order to leave the session
  • res_x, res_y, refresh_rate - optionally you can set the desired display resolution, will be reset to the original display mode when done
  • refresh_rate_use_max - when setting a custom display mode, set this to 1 if you prefer to always set the maximum refresh rate instead of specifying it by hand

I highly recommend the setup using gamestream_launchpad. Simply put gamestream_gog_galaxy.ini and gamestream_launchpad.exe in C:\Program Files\moonlight_hdr_launcher and uncomment the relevant lines in moonlinght_hdr_launcher.ini. Note: As of 1.1.2 the installer will download gamestream_launchpad automatically.

Additional notes regarding macOS.

  • As of Moonlight version 2.2.0 the HDR stream is not rendered correctly, images appear very bright, there is significantly less contrast, not more. This is a known issue moonlight-stream/moonlight-qt#61
  • To enable HDR streams users need to edit the moonlight plist file located at ~/Library/Preferences/com.moonlight-stream.Moonlight.plist and set videocfg property to 3
    • Note, this property will periodically reset to 0, so if having trouble starting a HDR stream verify videocfg is set to 3.
  • You will know when a HDR stream is being delivered as in the debug overlay, you will see (Codec: HVEC Main 10) and HDR options can be enabled in-game.

Example configurations

HDTV & HDR monitor owners

If you have an HDR monitor connected to your PC or a DisplayPort dongle that supports HDR, you can rely on the toggle_hdr option.

This example will use gamestream_launchpad to launch GOG Galaxy. First step is to put gamestream_gog_galaxy.ini and gamestream_launchpad.exe in C:\Program Files\moonlight_hdr_launcher.

moonlight_hdr_launcher.ini:

[options]
launcher_exe = gamestream_launchpad.exe 2560 1440 gamestream_gog_galaxy.ini
toggle_hdr = 1
wait_on_process = 1

gamestream_gog_galaxy.ini:

[LAUNCHER]
launcher_path = %%programfiles(x86)%%\GOG Galaxy\GalaxyClient.exe
launcher_window_name = GOG Galaxy 2

[BACKGROUND]

[SETTINGS]
debug = 0
sleep_on_exit = 0
close_watch_method = window

Variant with compatibility_window=1:

This configuration allows for avoiding the "Connection terminated" message after quitting gamestream_launchpad. Requires gamestream_launchpad 0.8 for the --no-nv-kill option.

moonlight_hdr_launcher.ini:

[options]
launcher_exe = gamestream_launchpad.exe 2560 1440 gamestream_gog_galaxy.ini --no-nv-kill
toggle_hdr = 1
wait_on_process = 1
compatibility_window = 1

HDTV owners without HDR monitor

Update: For a while GameStream has been adding the entry for Steam Big Picture on its own as a separate cover and it does support HDR. The solution below is redundant. OS-level HDR games still won't work though.

Note: This will not make OS-level HDR games (e.g. Cyberpunk 2077) work. Buy a DisplayPort dongle with HDR support.

The only way (allegedly) to achieve HDR support is to launch Steam Big Picture through the launcher. Bear in mind that this solution creates sessions that need to be force-quit from Moonlight. This example does not use gamestream_launchpad. After starting the launcher, it is imperative that your game is in true fullscreen mode. "Windowed fullscreen" will not work.

Your mileage may vary.

moonlight_hdr_launcher.ini:

[options]
launcher_exe = C:\Program Files (x86)\Steam\steam.exe steam://open/bigpicture
wait_on_process = 0
# no HDR toggle because there are no HDR monitors and wait_on_process=0
toggle_hdr = 0

HDTV owners withouth HDR monitor (gamestream_launchpad version)

This is the same as the previous example, but using gamestream_launchpad.

moonlight_hdr_launcher.ini:

[options]
# launch Steam Big Picture using gamestream_launchpad
# please adjust resolution
launcher_exe = gamestream_launchpad.exe 2560 1440 gamestream_steam_bp.ini
wait_on_process = 1
toggle_hdr = 1

gamestream_steam_bp.ini:

[LAUNCHER]
launcher_path = %%programfiles(x86)%%\Steam\steam.exe steam://open/bigpicture Fullscreen
# set it to something other than Steam because gamestream_launchpad can detect multiple windows and will close prematurely
launcher_window_name = NotSteam

[BACKGROUND]

[SETTINGS]
debug = 0
sleep_on_exit = 0
close_watch_method = window

FAQ & Troubleshooting

  • I want to be able to play Mass Effect Andromeda while using this launcher.

    GameStream will add two separate entries and you will see two covers for Mass Effect Andromeda in Moonlight, but one will have the proper artwork and it's the one with the real game. In any case you are still able to launch Mass Effect Andromeda through the launcher you're running, be it GOG Galaxy 2 or Steam.

  • The installer keeps saying that it can't find the entry for Mass Effect Andromeda.

    • Force-quit GeForce Experience.
    • Remove C:\Program Files\moonlight_hdr_launcher or rename MassEffectAndromeda.exe to something else.
    • Restart GeForce Experience and scan for games.
    • Force-quit GeForce Experience or restart your PC.
    • Re-instate MassEffectAndromeda.exe or re-run the installer.
    • Scan for games in GeForce Experience.
  • I don't have an HDR monitor and I want to play Cyberpunk 2077 in HDR.

    You can't. Cyberpunk 2077 is an OS-level HDR game. You need at least a DisplayPort dongle that supports HDR.

  • Nothing happens when I run the "Mass Effect Andromeda" entry in Moonlight/Shield.

    Go to C:\Program Files\moonlight_hdr_launcher and try running the MassEffectAndromeda.exe file directly. See if the moonlight_hdr_launcher_log.txt file is being created. If reporting an issue, describe what happened and attach the log file.

    Go to <user folder>\AppData\Local\NVIDIA\NvBackend\StreamingAssetsData\ and see if the mass_effect_andromeda\<number>\ folder exists and contains StreamingSettings.json. If either do not exist, see the answer to The installer keeps saying that it can't find the entry for Mass Effect Andromeda..

    Check the write permissions on C:\Program Files\moonlight_hdr_launcher (should be write for all users).

  • I'd like to report an error.

    Create an issue in GitHub and attach:

    • moonlight_hdr_launcher_install.log (found alongside install.exe);
    • moonlight_hdr_launcher_log.txt (from C:\Program Files\moonlight_hdr_launcher);
    • all *.ini files from C:\Program Files\moonlight_hdr_launcher;
    • <user folder>\AppData\Local\NVIDIA\NvBackend\StreamingAssetsData\mass_effect_andromeda\<number>\StreamingSettings.json;

Building the launcher executable

  • Obtain NVAPI.
  • Install vcpkg.
  • Build with CMake, setting NVAPI_DL_PATH to the location of the NVAPI zip file and CMAKE_TOOLCHAIN_FILE to the location of your vcpkg toolchain file (e.g. C:\vcpkg\scripts\buildsystems\vcpkg.cmake).

If you don't know how to build projects with CMake, better not attempt it.

Building the installer

First, install Python 3. Then:

pip install -r requirements.txt
pyinstaller install.spec

install.exe will be put in dist.

Attribution

This code uses parts of hdr-switch by Brad Gearon under the following license:

MIT License

Copyright (c) 2020 Brad Gearon

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

This code uses the WinReg library by Giovanni Dicanio under the following license:

MIT License

Copyright (c) 2017-2020 by Giovanni Dicanio

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].