mpv-player / mpv

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

Video stutters #14753

Open mitch133 opened 2 months ago

mitch133 commented 2 months ago

mpv Information

All MPV releases since september 24th 2023 (mpv-x86_64-v3-20230924-git-140d018.7z)

Other Information

- Windows version: 11 23H2
- GPU model, driver and version: INTEL UHD Graphics 620 (last drivers 31.0.101.2128) / Lenovo X390 Yoga Laptop 
- Source of mpv: www.mpv.io (your website)
- Introduced in version: 20230924 (mpv-x86_64-v3-20230924-git-140d018.7z)

Reproduction Steps

Starting from this version of MPV, all my videos stutter on my Lenovo Laptop (8 GB RAM, Intel UHD 620).

1) The problem doesn't occur with my standard assembled PC from 2016 (32 GB RAM, Geforce GTX 970) 2) When I rollback to any previous version before september 24 of 2023, everything works fine again on the mentionned laptop

Expected Behavior

Video should play normally, without stuttering, as it always did in previous versions

Actual Behavior

Video stutters

Log File

output.txt

Sample Files

https://www.dropbox.com/scl/fi/81asa94qf2oqaz5ituflp/GH010302.MP4?rlkey=g7tayieqyfu0nzcfsn9mq468z&st=mi7t2jik&dl=0

I carefully read all instruction and confirm that I did the following:

kasper93 commented 2 months ago

Try with --profile=fast

mitch133 commented 2 months ago

Hi @kasper93, thx for your tip, it works with last MPV version. But is it the normal behaviour? I mean why do I have to use this command line now?

And/or how do I do to keep this setting for next files / openings, as MPV is set as my default player?

Thank you

kasper93 commented 2 months ago

thx for your tip, it works with last MPV version.

Actually your GPU should be able to handle the playback just fine with default rendering config. I just tested it on the same hardware.

The main issue is that uploading 4k video frame to GPU steals a lot of gpu bandwidth that we have. Profile fast hides this issue, but in itself it is not needed. You should add to to your config vo=gpu-next which is little bit faster and hwdec for hardware decoding to avoid performance bottleneck and improve battery life. Once you have those both options you can use default profile or profile=fast for less resource usage or cscale=bilinear which should be enough. You can also add d3d11va-zero-copy to config.

Hardware decoding should be enabled by default, but this is another controversial topic, because a lot people are saying that your don't need it. But even though you might not need to for decoding, the cpu->gpu copy is often very taxing for smaller mobile GPUs, especially for 4k frames which is a lot of data to transfer.

And/or how do I do to keep this setting for next files / openings, as MPV is set as my default player?

See https://mpv.io/manual/master/#configuration-files and https://mpv.io/manual/master/#files-on-windows

But is it the normal behaviour? I mean why do I have to use this command line now?

Yes, it is normal now. It is somehow controversial topic, but we settled on the current settings and profile=fast when needed. Like said before, not needed in this case.

Andarwinux commented 2 months ago

Consider using vf=d3d11vpp:scale=0.5:scaling-mode=standard, which allows my UHD750 to play 4K60HDR video at an acceptable speed without stutters.

kasper93 commented 2 months ago

This is actually good tip. hermite dscale is fast, but pre-downscaling before we even start processing the data is also an option to reduce the load all over the board.