mpv
mpv copied to clipboard
mpv framerate tanks after a certain resolution
Summary
mpv drops frames dramatically after it reaches a certain resolution. Very similar to #8613, but it only happens with scale=ewa_lanczossharp. cscale=ewa_lanczossharp and video-sync=display-resample work without issues on my machine.
A screenshot of this video to show my point:
Corresponding mpv.conf:
hwdec=vaapi-copy
#profile=gpu-hq
scale=ewa_lanczossharp
hdr-peak-percentile=99.995
hdr-contrast-recovery=0.30
deband=yes
Important Information
- mpv version: v0.37.0
- Linux distro: Arch Linux
- Source of mpv: distro-supplied
- GPU: Intel HD Graphics 4400 (Intel i5-4300U CPU)
Reproduction steps
Use scale=ewa_lanczossharp in mpv.conf, or have profile=gpu-hq
Expected behavior
No frame rate drops for a static image
Actual behavior
Lots of dropped frames
Log file
Sample files
https://0x0.st/Hlfc.mp4
An HD 4400 is probably too weak to both upscale with a polar filter and deband, using either faster scaler or not enabling debanding should fix this. Debanding that video is useless anyway, and it'll be removed from the high-quality profile soon. #13172
No frame rate drops for a static image
It's not a static image, it's a video file where every frame is the same. This won't happen if you open a real static image like jpeg or png.
Stream #0:00x1: Video: h264 (Main) (avc1 / 0x31637661), yuv420p(progressive), 726x720 [SAR 1:1 DAR 121:120], 182 kb/s, 25 fps, 25 tbr, 12800 tbn (default)
I agree that this video isn't mjpeg or something, but I don't think this has anything to do with debanding. I turned debanding off and tested it again with mpv v0.37.0 and mpv v0.36.0 (compiled from the source code given in GitHub releases). Whatever it is, it appears to be a recent change.
The same mpv.conf was used:
hwdec=vaapi-copy
#profile=gpu-hq
scale=ewa_lanczossharp
#cscale=ewa_lanczossharp
hdr-peak-percentile=99.995
hdr-contrast-recovery=0.30
#deband=yes
mpv v0.37.0:
Log: mpv_new_log.txt
mpv v0.36.0:
Log: mpv_old_log.txt
Try vo=gpu-next? I can't think of what might cause a performance regression on vo_gpu.
You can also try setting scale=ewa_lanczossharp and cscale=bilinear on 0.37.0, because after 0.37.0 cscale will automatically follow scale if not specified.
Thanks for the quick responses, but there's no obvious improvement. Oh, and since the other issue mentioned the DE, this is happening on KDE plasma as well as a TWM setup that I have where I use dwm with picom as a compositor.
With vo=gpu:
Log: mpv_log.txt
With vo=gpu-next:
Log:
mpv_log_gpu_next.txt
Found the exact commit that caused my current issue: https://github.com/mpv-player/mpv/commit/44cf6288c73b71d22a98870cb08b1daf9da5e048
Additionally, scaler-lut-size=8 in profile=gpu-hq was committed around 4 months ago, and that somehow escaped my radar.
With scaler-lut-size=8 on mpv v0.36.0:
And with scaler-lut-size=6 on mpv v0.36.0:
I think it'd be a good idea to bring that back as an option, and I have created a PR for this.
I'm not sure if this is related, but here is my current experience with a recent mpv version: When increasing the speed of a video, the CPU usage scales nearly proportionally. Is that expected? I have used mpv for a couple of years, and this has never been the case iirc. So currently, playing a video at normal speed uses ~50% CPU, whereas playing at 3x speed causes 120% CPU usage on my laptop (Thinkpad T470P with integrated Intel graphics on Linux).
I don't believe this is related. What codec is the video?
Might be unrelated but I downgraded from 0.37 to 0.36 on OSx for the same reason.
Might be unrelated but I downgraded from 0.37 to 0.36 on OSx for the same reason.
--profile=fast