Aleksoid1978 / VideoRenderer

Внешний видео-рендерер
GNU General Public License v3.0
1.03k stars 115 forks source link

System lag after openig a video when right click on desktop #55

Closed bibsp closed 2 years ago

bibsp commented 2 years ago

**1. This happens when using MPCVR.

  1. This happens only for first time right click. EVR-CP has no issue.**

And the shocking thing is that when I tried to screen record the issue using OBS then the problem is just gone. Watch this video till the very end. You will understand. https://drive.google.com/file/d/1PuGY3f3niPhGB2r0VLd4vZBxsO4jm2ZX/view?usp=sharing

As you can see when OBS is in backgrond no such problem. Maybe OBS is triggering something which is also required for the player.

  1. I have tested with both dxva2 and d3d11.
  2. I have tested with HW decoding turned off. No changes.

System Specs: Ryzen 5 5600H RTX 3050 mobile 8GB RAM 144Hz screen

Aleksoid1978 commented 2 years ago

Can't reproduce.

bibsp commented 2 years ago

Can you test this in laptop? Especially HP pavilion gaming series if you can arrange from someone. Maybe dual GPU causing problem.

2nd problem is this is my friend's laptop. I can't do much experiment on it.

clsid2 commented 2 years ago

Disable the graphics driver context menu shell extensions with ShellExView and it will probably be solved.

I don't see how this could be the fault of the renderer.

Edit: laptops often have two GPUs, so lag could be because of a GPU switch or activation.

Aleksoid1978 commented 2 years ago

I don't have laptop.

P.S. Enable Statistics in VR and record video again. Also you can run GPU-Z, open Sensors tab.

Aleksoid1978 commented 2 years ago

Try uncheck "Use Direct3D 11".

bibsp commented 2 years ago

P.S. Enable Statistics in VR and record video again. Also you can run GPU-Z, open Sensors tab.

https://drive.google.com/file/d/1825nTazzEniGfGQrVsT6VMV1YUhyFetk/view?usp=sharing

Screenshot (4) Screenshot (5)

bibsp commented 2 years ago

Disable the graphics driver context menu shell extensions

Unfortunately that's not working. It is because of two GPUs. Because when I open Nvidia control panel same thing happens like OBS. Means problem is gone when Nvidia control panel is open in background. MPCVR is not calling dedicated GPU. This maybe the reason.

laptops often have two GPUs, so lag could be because of a GPU switch or activation.

Yes. Then how EVRCP is fine?

Aleksoid1978 commented 2 years ago

In general, this is how developers cannot test this behavior in any way due to lack of equipment. Therefore, the topic can be left open, you can close - it doesn't matter :)

clsid2 commented 2 years ago

You can configure in Windows advanced display settings which GPU an application should use.

bibsp commented 2 years ago

You can configure in Windows advanced display settings which GPU an application should use.

Yes. This trick is actually working. No lag. But the problem here is high GPU usage, which will eat battery life.

I want to use Radeon graphics for decoding+MPCVR (without lag). Which is not possible now. Somehow EVRCP is lag free with Radeon graphics. This is the biggest mystery.

clsid2 commented 2 years ago

Doing that would be incredible stupid.

Just don't right-click the desktop when playing a video.

ale5000-git commented 2 years ago

@Alp1821 Does it work fine also on standard EVR (without CP)? Maybe Microsoft is using an undocumented API to get priority over desktop.

Have you tried to enable "Process priority above normal" in MPC-HC settings?

bibsp commented 2 years ago
  1. Yes it is fine with EVR.
  2. Process priority above normal, this setting has no effect on this particular problem.
  3. Today I Installed madVR just to check. madVR also has exact same problem.

Now it's getting complicated.

Aleksoid1978 commented 2 years ago

I am 100% sure that this is a problem with drivers and / or activation of one of the video adapters. EVR is probably somehow tracked in the driver.

bibsp commented 2 years ago

EVR is probably somehow tracked in the driver.

Is it possible to do the same with MPCVR with some source code modification? Close this if u want. I'm now using this trick. 👇

You can configure in Windows advanced display settings which GPU an application should use.

ale5000-git commented 2 years ago

@Alp1821 What Aleksoid1978 has said is that probably the driver of video card have some special code for EVR (and maybe other Windows default renderers). If this is the case then the report should be to the developers of video card drivers (that may take years to fix if they consider it important enough).