Aleksoid1978 / VideoRenderer

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

[BUG]High CPU Usage When Frame Rate Exceeding Monitor Refresh Rate #148

Closed douziovo closed 2 months ago

douziovo commented 2 months ago

When playing videos using MPC-BE and MPC Video Renderer, there is a noticeable increase in CPU usage if the video’s frame rate surpasses the monitor’s refresh rate. This issue does not occur with Enhanced Video Renderer (EVR).

Software version MPC-BE 1.7.0 MPC Video Renderer 0.7.3.2210

Aleksoid1978 commented 2 months ago

Sample file. Show you MPC VR settings.

douziovo commented 2 months ago

This is my MPC VR settings.

image

This is a sample file https://drive.google.com/file/d/1lgTamQ9FuimEwEOFR8eveBpR9oonzd8a/view?usp=sharing

You can test on a monitor below 120Hz.

Aleksoid1978 commented 2 months ago

Show CPU usage on EVR CP and MPC VR, also show on "normal" file with 23.976 fps.

Aleksoid1978 commented 2 months ago

And it is not at all correct to compare with a regular EVR, it is much simpler. Although my workload is approximately the same.

If this bothers you, use EVR.

v0lt commented 2 months ago

What version of Windows do you have? What video card do you have? Is hardware acceleration used for video decoding?

You can also take a screenshot with video renderer statistics. This clears up a lot of questions.

douziovo commented 2 months ago

This is my computer setup.

CPU 12th Gen Intel(R) Core(TM) i5-12400 2.50 GHz GPU NVIDIA GeForce RTX 2060 SUPER GPU Driver Version31.0.15.5212 Monitor LG27GP83B@59.951Hz Edition Windows 10 Pro Version 22H2 OS build 19045.4170 Experience Windows Feature Experience Pack 1000.19054.1000.0

I decoded the video using hardware acceleration and reset the settings for MPC-BE, EVR and MPC VR. I've also included some screenshots hoping it helps resolve the issue.

MPC VR

120FPS image image

23.976FPS image image image

23.976FPS 4X image image

EVR

120FPS image image

23.976FPS image image

23.976FPS 4X image image

clsid2 commented 2 months ago

When is decided when a frame is dropped? Before processing, after processing, or both before and after?

Because when input framerate is much higher than output, you already know before processing.

Aleksoid1978 commented 2 months ago

Different decoder - dxva vs d3d11. Compare in MPC VR in Direct3D9 mode.

douziovo commented 2 months ago

DXAVA2 + D3D11 VR

This looks like software decoding image image

DXVA2 + D3D9 VR

image image

D3D11 + D3D9 VR

image image

Aleksoid1978 commented 2 months ago

As I understand, in the DXVA2 + D3D9 VR mode the load is normal, which means the video drivers are entirely to blame, I have a 4060 and there is no such problem.