mpv-player / mpv

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

display-sync performance #2217

Closed Argon- closed 6 years ago

Argon- commented 9 years ago

While it works just fine on my desktop it's dropping frames on my laptop (Intel Iris 6100). I would've assumed the hardware is just too bad but people on IRC mentioned it should be better, therefore I'm reporting it (more like asking) to know for sure. I was told when interpolation and real 60 fps videos work without frame drops then display-sync should too -- but it doesn't.

My laptop's display has 59.971589 fps, as detected by mpv. All following cases except the last one are with default video-sync (audio).

Breakdown:

Is this to be expected or unusual?

ghost commented 9 years ago

Actually I'd expect interpolation and display sync with interpolation to have similar performance. The amount of work done should be the same.

From your log I'd just guess your GPU is slightly too slow for the workload.

wiiaboo commented 9 years ago

I can confirm lots of VO dropped frames while showing something like stats.lua and I have a mid-high end GPU (AMD HD 7870). It's just while keeping the button pressed to show stats.lua or with OSC showing, not if I just press once.

ghost commented 9 years ago

stats.lua puts a high load on libass, so rendering might take "too long". But the same problem should happen with interpolation. On the other hand, the frontend doesn't really care about the extra frames for interpolation, and doesn't additionally drop frames or adjust audio sync.

Though I would expect that interpolation actually drops frames (even if it's not displayed on the framedrop counter), which should be visible if interpolation really does something.

ghost commented 9 years ago

Also, please dump your GPU sepcs and driver versions. It's possible that mpv estimates the video position incorrectly, and then ruins sync by adjusting audio position etc. Bad/unexpected driver behavior can become more apparent.

ghost commented 9 years ago

Also, try the display-resample-vdrop mode. It can actually be more robust against VO jitter.

Argon- commented 9 years ago

Though I would expect that interpolation actually drops frames (even if it's not displayed on the framedrop counter), which should be visible if interpolation really does something.

Is it somehow possible to verify this, maybe a higher log level?

From your log I'd just guess your GPU is slightly too slow for the workload.

Could the workload be a little bit different? I'd assume a RAM-using iGPU has a worse bandwidth/texture fill rate than a GPU with dedicated memory and maybe display-sync has a higher bandwidth requirement?

Also, please dump your GPU sepcs and driver versions. It's possible that mpv estimates the video position incorrectly, and then ruins sync by adjusting audio position etc. Bad/unexpected driver behavior can become more apparent.

Uh, that's OSX we're talking about. I'm not sure where to get any driver information, except OpenGL is at version 4.1 (Intel 10.6.31). It's about this CPU and iGPU.

Also, try the display-resample-vdrop mode. It can actually be more robust against VO jitter.

Looks a little bit better from the numbers. Around the same number of missed frames but less VO-dropped ones (for the same scene I used for the tests in my first post).

Akemi commented 7 years ago

i wonder if this still happens since a lot of things have changed since it was initially reported?

Argon- commented 7 years ago

I'll try to test this again this week. I can't give anecdotal information about how this changed over time because I usually don't use display-sync. Well, actually, since I have a desktop computer again I'm kinda starting to.

Reading this issue now makes me wonder if the (now fixed) general problems of display-sync on OSX might've been the culprit.

Akemi commented 7 years ago

i don't know if you had time to test it again but PR #4391 changes quite a bit an potentially fixes this among a lot of other issues. feel free to test otherwise i will most likely close this issue when the PR gets merged.

Argon- commented 7 years ago

I'm afraid I have not. These days I'm using my laptop only at work. However, feel free to close it, I'll just reopen in case I still experience this problem later on.

Argon- commented 7 years ago

Actually, there's no way I can test this anymore as interpolation is no longer possible without display-sync. Additionally, I don't remember the original file I tested it with so I can't tell if display-sync got better (in terms of dropped frames) or if the file is just "easier" on my computer.

Akemi commented 6 years ago

fixed via c5e4538bc4b63f02bf89f62aa25a37b9eb0c0316.