Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Higher GPU usage in recent versions (e969072, 78719c1, 78d4374) #12648

Closed
Tsuchimikado opened this issue Oct 16, 2023 · 6 comments
Closed

Higher GPU usage in recent versions (e969072, 78719c1, 78d4374) #12648

Tsuchimikado opened this issue Oct 16, 2023 · 6 comments
Labels

Comments

@Tsuchimikado
Copy link

Important Information

Reproduction steps

Download mpv version e969072, 78719c1, 78d4374.
Play any video.

Expected behavior

GPU usage is normal.

Actual behavior

GPU usage is high 40-50% for 1080p30fps, 80-90% for 1080p60fps without hardware decoding.
4K60fps constantly dropping frames with hardware decoding.

Log file

Created with parameters --no-config --hwdec=auto --mute using 4K60fps test file.
output_230917_181eddc.txt
output_231001_e969072.txt
output_231008_78719c1.txt
output_231015_78d4374.txt

@llyyr
Copy link
Contributor

llyyr commented Oct 16, 2023

The default options were changed by #12384 to be higher quality. To get back the old low quality defaults, use --profile=fast

@Jules-A
Copy link

Jules-A commented Oct 16, 2023

Expected behavior: #12384

Weaker machines need to use profile=fast

While I don't really agree with the defaults over something like --scale=cosine --cscale=hamming which is like 3x faster than lanczos while looking close (imo, not as sharp but doesn't suffer from artifacts, --scale=catmull_rom --scale-param1=0.1 --scale-param2=0.45 if you need the sharpness), lanczos won by popularity. If you are still lagging at 4k then it might be the downscaling change also.

@kasper93
Copy link
Contributor

kasper93 commented Oct 16, 2023

GPU usage is high 40-50% for 1080p30fps, 80-90% for 1080p60fps without hardware decoding.
4K60fps constantly dropping frames with hardware decoding.

Like mentioned already, after recent changes, default mpv settings are tuned to be balanced between quality and performance. As opposed to previous defaults, which were fully performance focused. New profile exists --profile=fast as a base to maximize performance with recent mpv versions.

For the most part new defaults should work ok for most content even on weaker iGPU. But of course as you noticed Intel iGPU for 4k60 may be tricky. For native displaying it would be fine, but depending on downscaling it may be too slow.

You can try --vo=gpu-next and --gpu-api=vulkan with default profile. Especially for 4k60 file when you downscale to 1459x821 it should be a lot faster, because hermite downscaling is very optimized on gpu-next and not really on gpu.

I'm actually curious if you could see the difference between gpu and gpu-next on your hardware. You can take a look at stats page 2 (shift+i and 2 key to access it) to see rendering times and of course gpu usage is also good metric.

@sfan5
Copy link
Member

sfan5 commented Oct 16, 2023

Working as intended.

@sfan5 sfan5 closed this as completed Oct 16, 2023
@Tsuchimikado
Copy link
Author

Tsuchimikado commented Oct 16, 2023

--vo=gpu-next and --gpu-api=vulkan with default profile

does not really change anything, maybe my hardware is too weak

I'm actually curious if you could see the difference between gpu and gpu-next on your hardware

gpu-next uses about 5% more cpu and 2% more gpu
https://i.imgur.com/z5IOWrT.jpg

use --profile=fast

thank you, this fixed the high gpu usage issue

The default options were changed by #12384 to be higher quality

default mpv settings are tuned to be balanced between quality and performance

I am sorry but there is no significant difference between new default and fast profiles
comparison https://imgur.com/a/rIqks82 source https://www.youtube.com/watch?v=QI96hnhcr2E (1080p VP9)
new default profile uses as much gpu as madvr but resulting image is same with fast profile (a little bit blurrier in my opinion)

@Vamp898
Copy link

Vamp898 commented Apr 21, 2024

@Tsuchimikado to be fair, the sample video has very low image quality to begin with. You need higher quality material to see the difference so yes, in your case, it doesn't matter if you use fast, default or high-quality.

YouTube 1080p
1mbps avg (~5mbps peak)
YouTube 1080p Premium
1.5mbps avg (~6mbps peak)
YouTube 4K:
12mbps avg (~55mbps peak)

For comparison,
BluRay 1080p
30mbps avg (~40mbps peak)
BluRay 4K
100mbps avg (~140mbps peak)

So if you're watching mostly youtube, set profile=fast in your mpv.conf and be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants