-
Notifications
You must be signed in to change notification settings - Fork 862
Add Video Super Resolution for Windows (AMD, Intel and NVIDIA) and MacOS #1557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Here is a summary of my observations following many tests conducted with different settings and multiple GPUs. AMD delivers the best results, followed by Nvidia, then Intel. VSR (Video Super Resultion) performs exceptionally well in SDR, but HDR setup (in the code) is challenging, and some specifics feature (like sharpening) aren't yet avaible due to drivers limitation. I would advise using the Video Enhancement feature without HDR. 1) Nvidia RTX 4070 Ti: 2) Intel Arc A380: 3) AMD RX 7600: 4) Intel UHD Graphics Xe-LP (iGPU) Does the feature "Video Enhancement" have an impact on the performance? Does HDR work with Video Enhancement? Below are my suggestions for different scenarios with varying settings from host to display (Host->Stream->Display): My suggestion for Office: 1440->1440->1440 My suggestion for Games: 1080->1080->1440 GPU comparison (1440->720/1080->1440 / 150 Mbps / Static picture): In-motion block artifact comparison at low bitrate (1440->1080->1440 / 20 Mbps): In-motion GPU comparison: When upscaling (stream at 720 or 1080 to render on a 1440 display), in all scenarios AMD provides the best result. When we use native resolution (stream at 1440 to render on a 1440 display), v5.0.1, AMD and Nvidia are all similar, only Intel still give a pixelized picture. Resolution comparison (Nvidia Quality 4):
720p GPU comparison (1440->720->1440 / 150 Mbps):
1080p GPU comparison (1440->1080->1440 / 150 Mbps):
|
There is a lot of reformatting going on and it makes it difficult to review the changes. Can you disable whatever auto-formatting it is that you're running? Removing trailing spaces if there are any is OK though. |
@andygrundman , |
@andygrundman , |
Is there any test build with this feature available for Windows platform? Where can I download it? |
Here |
Thanks a lot. I'll check it :) |
After downloading the Windows build I've done some rapid tests and it doesn't seems to be working at all in my case. My setup is as follows: Host machine: Running at 1440p HDR (AMD Radeon Adrenaline driver) First I've enabled the new check box to activate the Upscaler enhancer. Connected to host with no issues but however the overlay info doesn't reflect any upscaler feature (pressing CTRL + ALT + SHIFT + S) Then to compare, i've deactivated the checkbox so the stream should be pure 1080p without any enhancement. To my eyes the image quality is identical, there is no difference. So I believe that I must be doing something wrong or the feature is not working. It could be helpful if, at least, the streaming overlay info could display something to know if the enhancer is being used or not. I've also tried lowering the host machine to 1080p while keeping the client working on 1440p and always selecting 1080p in Moonlight settings, but no difference. May be I'm missing something or may be the Intel GPU is not compatible with this experimental feature. |
Can't get this working. Is this feature using this library: https://github.com/OpenVisualCloud/Video-Super-Resolution-Library ? or it's only enabling some features already present into the GPU drivers? If this depends of the installed drivers then it should detect it before displaying the checkbox or at least display any warning, because right now I can just enable or disable it and the image quality is the same, it's just identical, no changes. |
Hi @fidoboy , If you are able to check the box, it means that your iGPU has this feature capability, otherwise it will be greyed out. When you stream at a lower resolution than your screen, make sure you use borderless fullscreen or fullscreen, select hardware acceleration and that the overlay stats is displaying "AI-enhanced" like below while streaming. |
The CPU is Intel Celeron N4500 and I can check or uncheck the checkbox, it's not grayed out. But It doesn't display that overlayed info like yours. Mine shows HEVC 10bit only but there is not "AI Enhanced" text when the feature is enabled. What else can I try? |
I'm using this build: https://ci.appveyor.com/api/buildjobs/fntsewbjxekye2v2/artifacts/MoonlightPortable-x64-r2725.zip The new checkbox is being displayed, it's not grayed out but I does nothing. The image quality is identical when the feature is activated or when it's not and the overlay stats does display nothing about "AI-Enhanced" I've done my tests with 1440 -> 1080 -> 1440 and also 1080 -> 1080 -> 1440. There is no changes when the feature is activated, image is exactly the same I'm sorry but I doesn't have Chrome to test. I never use that browser |
Yes, that the correct version. |
I forgot to say that I've also tried without HDR enabled in moonlight settings. The result is the same. There is no "AI-Enhanced" text in the overlay info. |
Hi @jasperaelvoet ,
MTLFXSpatialScalerDescriptor documentation |
This feature is awesome! |
Well, I spent some time doing new tests with this feature and, in short terms, this is a placebo. There is no difference between the image quality when it's enabled or disabled. I've tried the following setups:
In both cases HDR was always enabled and in both cases I've compared between the video upscaler enabled and disabled. I have verified it because the text "AI Enhanced" was being displayed into the overlay stats. There was no any difference between them in the terms of image quality, the clarity, sharpness, etc. are exactly the same. And then I've tried the setup 1440 -> 1440 -> 1440 and the difference is very noticeable. So, in short, now the text is being displayed into the overlayed info but THERE IS NO ANY CHANGE IN IMAGE QUALITY. The image is the same if the feature is activated or not. There is no difference. |
I'm already laughing because your post is a real nonsense. What's the point to use this feature if you are streaming with the same resolution than your display? If the device where moonlight is running already uses 1080p and the host and also the stream is 1080p, where is the purppose for a video upscaler? This only have some sense if the stream is a lower resolution than the display, but it doesn't do anything if the resolution is the same. |
I think it would be beneficial if you substantiated your observations with screenshots on vs off so contributors can see what exactly you see. In the other comparison screenshots there are discernible differences. But whether you notice can be quite subjective. |
Not sure if by latest release you mean the official release; If so, that won't work. This PR is still open -- it hasn't been merged to master yet. To test this feature out before it is merged and an official release is provided, you need to either download the code and build it yourself, or grab one of the releases some folks have provided earlier. |
No one precompiled it, but if not, which branch is it in? |
The simplest way is to download an artifact, I just created one here: |
:) My RX 560XT has access to this feature. |
Any possibility we will see at least NIS in Linux in shader implementation? |
I am currently refactoring the code using DirectX12 first, it will be a lot cleaner for maintenance, and I am expecting better performance for Low-end PCs. |
That sounds awesome, thanks! |
It's great, but unless you see any benefit in it for yourself, don't do it again because moonlight-qt is dead, the project is completely abandoned (I hope nothing serious happened to cgutman). I think it's great, but oh well... Thanks for this work anyway. |
Don't worry, the project is not dead. There is a commit in this repo just 5 days ago. The main topic of discussion is how to phase these major features to avoid introducing breakage. The current plan of record is to ship basically what's in master now and then do the SDL3 conversion and merge major feature PRs after that. This PR is touching core rendering code, so it needs to be done with extreme care and testing to avoid introducing regressions. |
Sorry, I said that because no new version has been released for a year, and the original PR for this feature has been open since February 2024. There are also some interesting PRs that haven't been looked at/reviewed. What's SDL 3 for? |
Out of curiosity, what's the rationale behind that plan? Granted I'm neither a graphics programmer nor a contributor to this repo, but I'd guess many PRs will need potentially lots of changes after migrating to SDL3. In my experience that sounds like a recipe for killing PRs. Instead, why not merge the current major PRs and then leave a warning for the community that the SDL3 migration is underway so that they're aware that new PRs will need to take that into consideration? |
I didn't intend to convey that we would do the SDL3 migration before merging PRs. I only meant we would do both after shipping v6.2.0. We will likely merge some PRs before SDL3 conversion for the reason you mention. However, most currently open PRs aren't touching SDL-related code that would be impacted anyway. |
@cgutman , |
Doesn't seem to pick up my GTX 1650 Mobile in laptop Optimus config (10400H UHD Graphics) |
|
Is FSR usable for all GPUs? If so, why not let the end user choose between the different upscalers? |
For 2D content, only FSR1 is availble.
In the DX11 version, I will keep the dropdown menu available, so you will be able to switch from one algo to another. |
Big Milestone!The DirectX 11 version of Video Super Resolution is now available in a dedicated branch: An executable file can be downloaded (until Oct 29) here: This version is not only aimed at recent GPUs that natively support the VSR method, but at all GPUs, using upscaler shaders as a fallback on Windows. Countless hours have been spent testing and fine-tuning the right settings for each GPU vendor and type. Here’s the list of GPUs I could test:
Please note that due to the complexity of the rendering pipeline (see the picture attached) over the time in order to cover all GPU specifics, I won’t be submitting the DirectX 11 version as a production Pull Request. The code has become too difficult to maintain by anyone else. I won’t continue working on the DirectX 11 version, but feel free to fork it if you’d like. I am now focusing on a DirectX 12 version which shall be better in many aspects. To use the feature, check the box "Video Super Resolution": By default, it automatically selects the most appropriate setup based on all the tests I’ve done, but you can also force another algorithm: Here is the DirectX 11 rendering pipeline for anyone who wants to understand the code structure (mainly d3d11va.cpp and d3d11_shaders.cpp): |
This current build has no effect if I select HEVC 4:4:4 right ? (Which is Vulkan not DX11) |
Works perfectly well on an Rx 560X with NIS and FSR1. |
I have maybe an unusual use case which doesnt seem to work, i am running two instances of your moonlight portable to two different PCs, only one seems to be able to run in Super Resolution |
For each, can you describe what GPU you have, and take a screen shot of the overlay stats? |
Oh it seems it is working according to moonlight. but the RTX icon that appears top right that usually indicates super resolution isnt there. Hmm. The hosts are a 2080TI, 3070 and the client is a 4090. |
It was already set to that, it seems only one instance is showing the RTX VSR icon. moonlight reports correctly on both as being 1440p stream, with RTX Super Resolution 1.5x |
Oh, interesting use case, I did not get it first, you actually run 2 moonlight instances on the same PC at the same time ? |
Yep haha. i multi box in a certain game but dont have the space for extra monitors so i just tab between them with moonlight. I'll give that a shot cheers. |
Video Super Resolution (VSR) for Moonlight
Video Super Resolution (VSR) is to video what DLSS is to 3D rendering.
So why not make Moonlight one of the first game streaming solutions to leverage this technology?
AI upscaling significantly reduces bandwidth usage without compromising video quality!
Tested GPUs:
Context
Video Super Resolution (VSR) is to video what DLSS is to 3D rendering.
So why not make Moonlight one of the first game streaming solutions to integrate this technology?
AI-based upscaling drastically reduces bandwidth usage while maintaining excellent video quality.
NVIDIA, Intel (link in French), and more recently AMD have all started promoting their respective AI-powered video enhancement technologies.
Implementation
Implementing VSR was not straightforward. I had to add a Video Processor component to D3D11VA to offload frame processing from the CPU to the GPU, allowing it to take advantage of additional GPU capabilities.
SettingsView.qml
.d3d11va.cpp
.Platform-Specific Details:
✅ NVIDIA: Provides VSR and HDR enhancement. I successfully implemented VSR for SDR content but have not yet managed to get HDR working (more details below).
✅ Intel: Provides VSR, but the results are significantly inferior to AMD and NVIDIA.
✅ AMD: Released AMF Video Upscaling, which delivers impressive results.
Additional Development (iOS)
For those interested in VSR for iOS, I have also developed moonlight-ios-MFX, but this is still a work in progress.
On an iPhone 13 Pro, the upscaler works well but is too power-hungry due to the Metal renderer (not the upscaler itself), making it impractical for now.
It may perform better on newer iPhone models, but I haven't tested them yet.
I don't have an Apple TV, but it could potentially work with minor adjustments and additional testing.
I won’t be maintaining the iOS version, so feel free to contribute and improve it!
Results & Comparisons
Resolution Test:
Banding Test: