-
Notifications
You must be signed in to change notification settings - Fork 3k
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
RTX Video Enhancement support #11390
Comments
There is already vf_d3d11vpp.c so it is actually trivial to extend it to select correct post processing extension. I personally don't have hardware to work with and implementing it blindly is never fun, so let's wait for another brave soul to add this. |
Just wanted to support this idea. No doubt that a MPV hero will take on this mission. :) The new feature is supposed to work not only on 4xxx cards but on 3xxx cards also. Caution, there may be some issues to tackle : memory leaks on some HEVC 10bit videos, or the enhancements not working on vertical videos. See here: |
I'm totally interessed to have this feature in mpv. |
I can take a look at this after getting access to a 40 series GPU |
If you need a tester @ me, I have a 4080 |
As a side-note to avoid possible misconceptions: RTX Video is also available for the RTX 30xx series. |
I currently have a 2080, and I will have access to a 4070 in ~2-3 weeks |
Tested on vlc-3.0.19 and it works. Now only mpv remain, I really hope it will be supported soon. Maybe with a lua script? A toggle option is mandatory in my opinion, because both MPC-HC and VLC have VSR always ON and it's annoying. |
yes we are waiting for MPV my RTX 3080 |
really sorry ooooppps |
update: I now have access to a 40-series GPU, just need to set up my devenv on windows, and I can take a closer look. |
Any luck? |
Aaaaand? |
Aaaaand, I can implement that, just need a GPU. We can discuss shipping/payment details in email. You can find my email address in my profile. (my nick on gmail) |
@kasper93 RTX VSR 1.5 now works on RTX 2000 series as well, don't need 4000 series. |
So I guess this was a joke or were you trying to scam someone? |
Scam of what? It has been months and looks like no one capable of adding this feature to mpv cares to do so. Like I said, I don't have NVIDIA GPU, nor I intend to buy one, so I won't work on this feature, unless someone contribute the GPU. And since there is constant nagging in here to get it implemented I offered my help and stated my price. I was mostly joking, because I don't expect you guys understand how contracting works, but messages like Look at my recent commit history in here if you call out scams... If anything I'm scammed of my free time working on this project. |
I think it looks pretty good. |
If you consider two messages between Jun and Oct as "constant nagging" and it bothers you, and you require sponsorship to start your work then probably you shouldn't spend your time for an open source project. Complains like yours won't persuade anyone away from asking for new features, explanations like @Andarwinux's will. |
People like you make me hate volunteering my work for open source. Your sense of entitlement is absurd. Nobody owes you this feature. And also nobody owes you an in-depth explanation of the technical or personal or monetary or whatever challenges keep it from being implemented as fast as you might like. The feature was asked for. The issue was not closed, so it's welcome. If you want it so much, develop it yourself and submit a PR. Otherwise, sit yourself down and wait patiently and politely and gratefully for the project's volunteers to do the work for you, free of charge, while you type "And?". |
I'm not begging you for development, I'm not even the one who typed "And". I'm just searching online and happened to found this issue, and it looks to me that the discussion was normal until somebody asks for a payment (I guess it's a joke). If you hate volunteering your work for open source then don't do it, like you said nobody is forcing you. |
Patches welcome |
This is not your place to state what others should or should not do in their own time.
Perhaps you're from some communist utopia but asking for payment for your work is nothing abnormal around the rest of the world. And if you're so bothered by someone not wanting to spend hundreds of dollars to implement a feature for free for randoms on the internet, then go ahead and be the change you wish to see in the world. Buy yourself a compatible gpu and send the patches. |
I really don't want to populate the Github issue with meaningless, unrelated messages in a but if you insist ok:
Agreed. Github issue is the place for tracking work and collaboration on the project, not for making jokes and spreading hates and stress.
Don't try to change the subject. It's definitely normal for asking payments for anything you have spent time on, lots of people work on open source projects for a living. If this is how you want this repository looks like, then it's fine, leave people there to fight against each others. |
Hey. |
How the driver handles the scaling is indeed not visible. But adding generic d3d11vpp scaling is good either way. Even if not VSR, it would still scale, deepening on vendor with various quality. Also note that passing frames through video processor can/will also apply other adjustments that they have in pipeline, which in most cases is not wanted.
I think you infer too much. d3d11 or d3d12 is only an API, there is no need to remove the scaler from d3d11 video processor to make it work for d3d12 video processor. Unless there would be needed API extension.
Similar situation, we just request the scaling. It is on driver control panel to expose proper feedback/control. |
Don't listen to paid AMD shills and false flaggers trying to subvert this issue |
AMD has it's own upscaling now. You don't even need NVIDIA gpu to implement this. Just the latest AMD ones. (at least for the AMD, probably different guids and so on)
https://www.amd.com/en/support/kb/release-notes/rn-rad-win-24-1-1 ... |
I assume this'll be the default setting for Chrome/Edge somewhat soon? BTW, the description blurb for this flag is:
Implying that MediaFoundation is already used for Widevine content etc. |
MPC-HC, Potplayer and VLC has already started using RTX VSR. Can we expect to see this in MPV soon? |
Having study the code of MPC Render, and chromium. The magic code is quite easy constexpr GUID kNvidiaPPEInterfaceGUID = {
0xd43ce1b3,
0x1f4b,
0x48ac,
{0xba, 0xee, 0xc3, 0xc2, 0x53, 0x75, 0xe6, 0xf7}};
constexpr UINT kStreamExtensionVersionV1 = 0x1;
constexpr UINT kStreamExtensionMethodSuperResolution = 0x2;
struct {
UINT version;
UINT method;
UINT enable;
} stream_extension_info = {kStreamExtensionVersionV1,
kStreamExtensionMethodSuperResolution,
1u};
hr = ID3D11VideoContext_VideoProcessorSetStreamExtension(p->video_ctx,p->video_proc,&kNvidiaPPEInterfaceGUID,
sizeof(stream_extension_info), &stream_extension_info); I tried to add this code to emoose/VideoRenderer@a684e0a |
Looking forward to hearing from you. |
Update the status: Now the RTX Super Res works, but with a little hard code, and NOT ready for merge. If you are curious about the code, just refer to https://github.com/billxc/mpv. This relies on the D3D11VPP filter and seems that it cannot be used together with vapoursynth filter. |
You are a hero. Hope @kasper93 can merge this into mpv. |
The vapoursynth filter is a CPU filter, so it's never going to work directly. You would need to do a GPU upload/download (depending on the order of operations) to the frames into the right place for the other filter. I expect ffmpeg has upload/download support for d3d11va so it ought to be possible, but you'd need to work out how to construct the correct filter chain yourself, and you may still find additional limitations getting in your way. A mergeable implementation would require extending the d3d11vpp filter to have a scaling mode with proper specification of the output frame size/format/etc and then a way to select the scaling mode (of which RTX Video is just one of many). |
@billxc Any updates on this? |
https://github.com/billxc/mpv/releases/tag/MPV-RTX-SuperRes-RC Not quite ready for merge, but ready for test. Note: the filter usage is not the final version, and may be changed in the future. |
I downloaded mpv.exe and run it with following config. Mpv loads filter and triggers super resolution on NCP however it breaks video. See screenshot below. In some video files it doesn't trigger super resolution at all. Tried a few things but couldn't find out why. vf-add=d3d11sr |
@billxc First off, it's great that you're working on this, and thank you for looking at my original feedback. However, after taking an initial look at your tree, it looks like you have written it as a separate filter. For it to be mergeable, the functionality should be added to Also, the filter's configuration interface should not hard code the "Super Resolution" concept - as I understand it, it's just a generic scaling function and vendors or anyone can write and plug in a scaling algorithm (I see you have added Intel as a second example), so it should just be a Feel free to open a PR - it will be easier to discuss there. |
Also to make it scalable for the future we could extend options of |
so nice, performance better than ravu. thx !!!! |
Adds `--vf=d3d11vpp=scaling-mode` to control which extensions should be enabled. Fixes: mpv-player#11390 Co-authored-by: xc <[email protected]>
Adds `--vf=d3d11vpp=scaling-mode` to control which extensions should be enabled. Fixes: mpv-player#11390 Co-authored-by: xc <[email protected]>
Adds `--vf=d3d11vpp=scaling-mode` to control which extensions should be enabled. Fixes: mpv-player#11390 Co-authored-by: xc <[email protected]>
Adds `--vf=d3d11vpp=scaling-mode` to control which extensions should be enabled. Fixes: mpv-player#11390 Co-authored-by: xc <[email protected]>
Adds `--vf=d3d11vpp=scaling-mode` to control which extensions should be enabled. Fixes: mpv-player#11390 Co-authored-by: xc <[email protected]>
Adds `--vf=d3d11vpp=scaling-mode` to control which extensions should be enabled. Fixes: mpv-player#11390 Co-authored-by: xc <[email protected]>
Adds `--vf=d3d11vpp=scaling-mode` to control which extensions should be enabled. Fixes: mpv-player#11390 Co-authored-by: xc <[email protected]>
Does this only work for Direct3d (i.e. Windows)? |
Yes, it works for d3d11, only on Windows. |
Hello, I tried to enable this but I don't seem able to do it, this is what I tried in my mpv.conf:
also tried without the vf-add, without scale=2.0, with different vo, but I don't notice any change in quality, and the nvidia panel says RTX super resolution is inactive. The logs however say "[d3d11vpp] NVIDIA RTX Super Resolution enabled" Is there any option I should set I'm missing perhaps? |
There was an RTX Video Enhancement release recently.
https://nvidia.custhelp.com/app/answers/detail/a_id/5448
Basically, it allows real-time AI video upscaling on recent RTX video cards.
It would be nice to have this feature available in mpv as well.
There's already a release for MPC with support of this:
https://github.com/emoose/VideoRenderer/releases/tag/rtx-1.0
The text was updated successfully, but these errors were encountered: