Windows game streaming, written in Rust. Built for Radeon and NVIDIA. Made for Moonlight.
Download Windows x64 installer · Portable ZIP
New in 6.1.0
Rubylight 6.1.0 makes the settings easier to read and a stream's bitrate easier to predict. The console's All settings shows the everyday choices and keeps tuning and compatibility settings one step away, a bitrate a device sets during a stream now means the same as the one in its settings, and a virtual display runs at twice the stream's frame rate unless you choose otherwise. The rest comes from a read of the whole code before this release: logs that could keep the host or its service from starting, port forwarding that did not survive a network change, helper programs that closed with the command that started them, and a list of smaller faults.
Highlights
- Settings you can take in. All settings shows the choices; tuning and compatibility settings are under Advanced, Expert settings, and search still finds every one.
- A bitrate set during a stream means what it says. The picture gets what a stream started with that bitrate would have, whether the device's stream menu, its automatic bitrate or Keep my bitrate asked for it.
- A virtual display at twice the stream's frame rate. That is the new default; 1000 Hz is one setting away.
- Programs your preparation commands start keep running, and so do programs an undo command brings back.
- Port forwarding recovers when the network changes: another router, another address for this PC, or a router that stopped answering.
- The host and its service start, and keep a log, when the log file is in trouble.
Settings
- All settings shows the choices, not every knob. The topic tabs keep the everyday settings; the tuning and compatibility ones (encoder tuning, error correction, controller details and the like) are under Advanced, Expert settings, in collapsed groups, and each tab ends with a link to its own. Settings that are on for everyone are under Debug switches. A setting you changed stays in its tab, marked Expert, and its group opens by itself.
- Search still finds every setting. Search, Ctrl+K and old links open the place where a setting now is, and the Ctrl+K result says where it is.
- A virtual display runs at twice the stream's frame rate by default. To keep 1000 Hz, set Virtual display refresh to 1000 Hz in the console; another choice made there earlier is kept. 1000 Hz spaces a capped game's frames most evenly: on an RX 7900 XT with a test picture capped at 60 fps, 0.04 % of frame intervals were more than 4 ms off at 1000 Hz, 0.23 % at twice and 2.22 % at four times the stream rate. A device that asks for variable refresh rate still gets 1000 Hz unless the setting is Off, and Off runs the display at the stream's own frame rate.
Bitrate and error correction
- A bitrate set during a stream means the same as the one in the app's settings. Of the bitrate set in Nightjar the picture gets what is left after error correction, audio and overhead: 14.99 of 20 Mbps. A bitrate Nightjar asked for during the stream, from its stream menu, its automatic bitrate or Keep my bitrate, was taken as the picture's own instead. So choosing the stream's own 20 Mbps raised the picture's bitrate by a third, and a step down of a tenth by Nightjar's automatic bitrate raised it too. The picture now gets what a stream started with that bitrate would have, and the answer to the app names the bitrate it asked for.
- Nightjar's own error correction no longer costs picture bitrate twice. With error correction set to automatic or to a fixed share in Nightjar, the PC took its own share off the bitrate set in the app and then the device's share again: at a share of 20 % the picture got a sixth less bitrate than with the PC's own error correction. The device's share now takes the place of the PC's, so the picture gets what it gets with the PC's own error correction unless the device asks for a larger share than the PC's own leaves room for (more than a quarter at the PC's default of 20 %). A bitrate the PC lowered for a weak connection is no longer reduced by the device's share a second time either.
- The host's bitrate adjustment counts loss right after a keyframe the device asked for, with Slow down after video loss off. Such a keyframe was taken for one the host made itself, so loss and keyframe requests in the second after it were not counted.
Apps, commands and the network
- A program a preparation command starts keeps running. A preparation command that starts a helper and ends by itself now leaves that helper running for the app, instead of the helper closing the moment the command returns. Close it in the command's undo if it should end with the stream. A command that fails, is stopped or runs past its time limit still closes everything it started.
- A program an undo command starts keeps running. An undo command such as
start "" app.exebrings a program back after the stream and leaves it open, for a preparation command's undo and a stream menu command's undo alike. - An app's window streams with AMD Direct Capture set. A stream of the app's window now captures it with Windows Graphics Capture and says so, as it already did with Desktop Duplication, instead of failing to open.
- Port forwarding recovers when the network changes. UPnP port forwarding kept the router it found when the host started: after another router took over, this PC got another address, or the router's UPnP stopped answering, the ports stayed closed until the host was restarted. A router that misses one renewal now keeps its mappings untouched; one that stays silent for two renewals in a row, by when their two-minute lease has run out, is looked for again, and the router found then maps the ports for the address this PC has now. The search for the router goes out first on the Ethernet and Wi-Fi connections in the order Windows itself prefers them, Ethernet on a Hyper-V external switch included, and a VPN that connects no longer draws it away while such a connection is there; only when none of them finds a router does it search the way it did before.
Logs and the Windows service
- The host starts even when its log cannot be rotated. A host log that had reached its size limit and could not be moved aside (another program holding it open) used to stop the host from starting; it now keeps writing to the same file.
- The host's log comes back after a rotation that could not reopen it. When the log had been moved aside but the new file could not be opened, writing went on in the moved file and the log itself stayed missing; the next line now opens it again. No line is lost.
- A host log deleted or moved away while the host runs comes back. Writing used to go on into the deleted file until the host restarted; the log now opens again with the next line written once ten seconds have passed. Lines written in between went into the deleted file and are lost.
- A host log that cannot be opened again stays within its size limit. While its file cannot be opened, logging goes on in the older files, which roll over as the log does instead of one of them growing without bound.
- The host's log copes with its folder being deleted and never grows past twice its size limit. When the log's folder is deleted while the host runs, the folder and the log are made again in the same way. A log that cannot be rotated at all (another program holding it, a folder in the way) is cut back at twice its size limit instead of growing, which drops the lines in that file; the log then says so in a line of its own, with how much was removed.
- The service starts even when its log cannot be rotated. A service log that had reached its size limit and could not be moved aside (another program holding it open) used to stop the service from starting; it now keeps writing to the same file, and the older service logs stay as they were instead of being dropped one by one. A log that cannot be rotated at all is cut back at twice its size limit instead of growing, which drops the lines in that file; the log then says so in a line of its own, with how much was removed.
- The service's log comes back after a rotation that could not reopen it. When the log had been moved aside but the new file could not be opened, later writes pushed the file being written through the older logs until it was deleted; the next line now opens the log again, and no line is lost.
- The service starts and runs without a log file when its log cannot be opened at all. A read-only
service.log, a folder in its place, a program holding it without letting others write, or a file in place of thelogsfolder used to stop the service from starting, and with it the host. The service now starts without its log and tries it again every minute. - A service log deleted or moved away while the service runs comes back, also when its folder was deleted with it. The folder and the log are made again with the next line the service writes once ten seconds have passed; lines written in between went into the deleted file and are lost. While the log cannot be opened again, the service goes on in
service.log.0, which rolls over with the older logs and stays within their size limit.
Fixes
- The console answers without a stutter during game-only audio. The host looked through the PC's programs once a second to find the game's sound while it held the running game's record, so console and launch requests waited each time; they no longer do.
- Back during a "leave this page?" question keeps the page and the address together. Pressing the browser's Back button while the console asks about unsaved changes used to leave the address bar on a different page than the one shown; staying now puts the address back, leaving follows it, and the question is asked once.
- A capture that missed its turn no longer costs two seconds and a restart of the conversion. When the GPU colour conversion could not wait for a capture from another graphics adapter, its next picture in that slot waited two seconds and then rebuilt the conversion; it now carries on with the next capture.
- The
compute_queue_realtimesetting now reaches the Windows Graphics Capture helper. With capture through its helper process the setting did nothing; the helper is now told and asks for the same real-time GPU priority. Nothing changes while it is off. The setting's description in the console now says first that it can hang the GPU driver. - On NVIDIA, slice delivery is no longer turned off for HEVC streams that never split a frame across encoders. On a GPU with several NVENC engines and a driver with API 12.2 or later, slices were turned off whenever split encoding was not set to Off, even where it never engages, such as below 2112 rows with split encoding on Automatic.
- The stream menu no longer fails on a long value. A row whose value was 32 characters or more (28 on the focused row) made the menu on the stream fail instead of drawing. The value is now cut with "..." and its label stays readable; rows that fit are drawn as before.
- Sleep PC, Restart and Shut down go ahead once the device was told they were accepted. A device that read the answer and closed its connection at once could leave the PC awake now and then, with no word why. The PC still stays on when the answer never left it.
Tested. Before the tag, a build of this release's code (without its last fix, the one for Sleep PC) and 6.0.1 were streamed in turns, three one-minute runs each, with default settings on both sides: to a laptop over Wi-Fi at 2880x1800 and 120 fps (6,575 to 6,581 frames shown per run against 6,565 to 6,578 on 6.0.1, none late or dropped in either), to a mini PC with Nightjar on Linux at 1280x800 and 60 fps (3,278 to 3,279 against 3,272 to 3,279, none late or dropped, decode time at the 95th percentile 11.9 to 12.1 ms against 11.8 to 11.9 ms), and to an Android handheld over Wi-Fi at 1080p and 120 fps with a debug build of the app (6,420 to 6,429 frames and no lost packet against 6,382 to 6,407 with up to 18 lost packets and one or two frames that could not be repaired; decode time at the 95th percentile 2.5 to 3.0 ms against 2.5 to 2.7 ms). No run changed the bitrate, and the PC's network card discarded no packet in any of them. A preparation command's helper program was still running during and after a stream on the new build and gone ten seconds in on 6.0.1. The virtual display's default and the Sleep PC fix were not part of these runs.
Install or upgrade
Disconnect your stream and close host-launched games, then run the installer. Your settings, paired devices and game library are preserved. Open the console at https://localhost:47990.