mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.3k stars 2.9k forks source link

Intel 750 on enabling deinterlace static content shakes/shimmers #12916

Open denz2 opened 11 months ago

denz2 commented 11 months ago

mpv v0.36.0-824-g7cab30ce Windows 11 Source of the mpv binary Windows builds by shinchiro (releases and git)

What happens is that pressing d while video player deinterlaces the video but all static content is shaking/shimmer.

I tried all sorts of mpv config but no luck I need expert help or there is an issue with the software.

I have Intel 620 and had the same issue that I reported 5 years ago I think but since that was 7 years hardware decided to buy a new 2023 Intel N100 thinking with 2023 hardware it will not have issue with deinterlace but to my disappointment same issue. There is no issue with VLC and MPC-BE and none of them have issue with deinterlacing on 620 or 750 which I currently have. I am surprised that no one of the devs uses mini intel pc.

I have tried with the default windows drivers same issue then installed drivers from Intel website the same issue.

Expected behavior

For the video to be deinterlaced preferable automatically like in VLC and MPC-BE and play smoothly.

Actual behavior

On pressing d the static content just shakes while the video is deinterlaced.

Log file

mpv-nosettings.txt

Thank you

po5 commented 11 months ago

Use a different deinterlacer.
d vf toggle bwdif This one requires software decoding or a copy-back hwdec. You can use vapoursynth if you want even higher quality deinterlacing, leagues above other players.

denz2 commented 11 months ago

Thank you no luck bwdif doesn't do anything the video is not deinterlaced. I will read into this vapoursynth.

mpvlog.txt

hooke007 commented 11 months ago

Because you were using Setting option 'hwdec' = 'd3d11va' (flags = 4)

Andarwinux commented 11 months ago

Intel GPUs on Windows are third class citizens, Vulkan is the only realistic option if you want to use hwdec+deinterlaces, but Intel's Vulkan driver only support VK_EXT_descriptor_buffer for Gen12.5 (DG2/MTL).

denz2 commented 11 months ago

Because you were using Setting option 'hwdec' = 'd3d11va' (flags = 4) Managed to get bwdif working by enabling no hwdec this one very high cpu % causing dropped frames and d3d11va lower cpu usage but still few dropped frames. Both of them no flickering of static data not usable both of them since it is very high cpu usage.

mpvlog hwdecno.txt mpvlog hwdecd3d11va.txt

denz2 commented 11 months ago

Intel GPUs on Windows are third class citizens, Vulkan is the only realistic option if you want to use hwdec+deinterlaces, but Intel's Vulkan driver only support VK_EXT_descriptor_buffer for Gen12.5 (DG2/MTL).

Does anyone know a reason why the devs of MPV don't want to support Intel ? . Since the others can get it working doesn't make sense in 6 years since I posted the first issue with 620 that it can't be fixed. I would assist as best I can for this to be sorted out.

denz2 commented 11 months ago

In case it helps have attached the VLC debug log and it is also using D3D11VA and the VLC debug Filter 'deinterlace' (00000153bd2f9c80) appended to chain. When looking at the GPU performance VLC is using video processing whereas MPV doesn't so the CPU and GPU usage is significantly higher.

vlc.txt

Doofussy2 commented 11 months ago

Try using gpu-next instead of gpu

https://mpv.io/manual/master/#video-output-drivers-gpu-next

denz2 commented 11 months ago

Thank you fair bit to read tried some settings unfortunately still dropped frames high cpu usage. MPV is using far too much of CPU and GPU resources and it is not using Video Process at all.

                      VLC                MPV

CPU 8% 40% 3D 20% 83% Video Decode 8% 6% V.Process 23% 0%

Screenshot 2023-11-21 193924

mpvlog.txt

Doofussy2 commented 11 months ago

By default bwdif doubles the frames. Try setting mode=0

https://ffmpeg.org/ffmpeg-filters.html#bwdif-1

denz2 commented 11 months ago

Thank you the cpu is lower to about 25% 3D 35% Video Deco 10% however the picture is not close as good as mode=1

Time to give up since the devs don't care or don't have anyone to contribute with Intel development I will stick to Android boxes for emby

hooke007 commented 11 months ago

But Why you alway tried to use bwdif, shouldn't deinterlace use yadif instead in this case (--hwdec=no/auto-copy)?

denz2 commented 11 months ago

If I use --hwdec=no and press d the cpu range goes from 60 - 70% and in the console there is a lot of dropped frames. using --hwdec=auto-copy press d the cpu range is between 40% - 50%.

VLC hardly uses any cpu cycles, WMC and MPC-BE 6%-10% and all of them use video processing whereas MPV doesn't use at all.

MPC-BE image

VLC uses even less image

MPV image

llyyr commented 11 months ago

You need to set profile=fast for a fairer comparison with other video players, as well as hwdec=auto-safe

Doofussy2 commented 11 months ago

I think the issue is that for some reason d3d11vpp doesn't really work.

denz2 commented 11 months ago

With profile=fast and hwdec=auto-safe the CPU usage is significantly lower but it is still much higher than comparable video player CPU is about 15% once I press d the video processing starts unfortunately the video is not watchable as static content shakes. The table on left that is shown on my screen it moves up and down

image

autosafe.txt

philipl commented 11 months ago

Intel have not historically had particularly good hardware deinterlacing algorithms, so it's possible that d3d11vpp is simply invoking a garbage algorithm from the Intel driver.

The reality is that with low end hardware, you're options are limited. If you want to minimise CPU usage, you want the full hardware path which means accepting whatever algorithm d3d11vpp ends up using. If you want a CPU deinterlacer, you need to use a copy back variant of the hwdec and you'll burn CPU on the download, deinterlacing, and then uploading. Either you have enough CPU headroom or you don't (and if you have an arbitrary target < 100%, then you're even more constrained).

In your last message, you just went back to using d3d11vpp with that combination of arguments, so it's not surprising.

Doofussy2 commented 11 months ago

It is curious though that vlc doesn't appear to have the same issue.

philipl commented 11 months ago

We don't know what the exact vlc configuration is that we're nominally comparing against so we can't attempt to reproduce it.

Doofussy2 commented 11 months ago

Well, I have an RTX 3050 and I can't get video processing to activate at all, regardless of the player I use. d3d11vpp does deinterlace but it happens during the decoding.

@denz2 maybe try different modes like mocomp. You'll need to use the command instead of pressing d.

vf=d3d11vpp=mode=mocomp

Also adaptive or bob etc

denz2 commented 11 months ago

Thank you for replying, everyone. The Intel issue is only with MPV. Both 610 and 750 have no issue with 4k Youtube videos or netflix. I tried the following video players no issue at all PotPlayer, Windows Media Center, VLC, Windows Media Player, MPC-HC, MPC-BE so it must be a bug in MPV. Some of those players are abandoned but they have no issue with playing on hardware that came in existence after. It means MPV is not using something from Intel that has been existence for 20+ years otherwise those abandoned video players would have stopped working with the updated drivers.

But at least it was close with " profile=fast and hwdec=auto-safe" All the players that use very little CPU use Video Processing and with profile=fast it is also using video processing only issue is the static content is shaking. From all the settings that I tried when it is not using video processing the static content doesn't shake but video is not watchable as there are many dropped frames because of high cpu usage.

In some of those players I can change the decoder from dxva2 to d3d11 and all use low cpu and low gpu

denz2 commented 11 months ago

Unfortunately no go try all the options in the manual same issue bob, adaptive. Tried different combinations like vo=gpu-next hwdec=auto-copy-safe all same issue.

I downloaded few other players and they all work fine. The only player that failed was smplayer but discovered it is using mpv backend so that explained the failure. So it must be a bug as if the video players that have been abandon play videos without any issue it means MPV is not using the driver properly. I wish I could help with programming but don't know how but with testing I will gladly assist. By the looks of it I must be the only Intel user of MPV.