GhostNaN / mpvpaper

A video wallpaper program for wlroots based wayland compositors.
GNU General Public License v3.0
713 stars 21 forks source link

Graphical Glitches when playing videos #43

Closed notmentaloutlaw closed 1 year ago

notmentaloutlaw commented 1 year ago

Regularly any video that playing experiences random graphical glitches some a lot worse than others. Here is an example of an average glitch. This happens randomly and has no specific cause as far as my experience with it could tell.

What it looks like: glitch What it should look like: normal

My mpvpaper args consist of only --no-audio and --loop. I have an extensive mpv.conf that uses vo=gpu hwdec=vaapi and high quality settings and never experience this issue with mpv. I am on gentoo musl and this issue is the same regardless of window manager I use. I am using the latest version of mpvpaper from git. However mpv is on version 0.35.0

When I run mpvpaper this is the output it gives:

[!] mpvpaper does not support any other vo than "libmpv"
 (+) Video --vid=1 (*) (h264 1920x1080 30.000fps)
     Audio --aid=1 --alang=eng (*) (ac3 2ch 48000Hz)
     Audio --aid=2 --alang=eng (ac3 2ch 48000Hz)
Using hardware decoding (vaapi).
VO: [libmpv] 1920x1080 vaapi[nv12]
V: 00:00:19 / 00:00:30 (65%)
GhostNaN commented 1 year ago

Welcome to the club!

It's appears to be a vaapi bug that never got squashed. There is nothing on my end that I can do about it. Look here for details.

Here are some examples I have:

ddlcglitch screenshot-2022-05-25-18:53:50 screenshot-2022-05-24-22:28:56

notmentaloutlaw commented 1 year ago

Thanks for the info I will create an issue on mpv side to say that this issue persists when the --vo=libmpv as this issue does not exist when the --vo=gpu for example. Hopefully that will fix things. Although this isn't confirmed I think if you dont use hardware acceleration you wont get this issue. Although depending on your cpu it will just eat it up, which is annoying.

GhostNaN commented 1 year ago

this issue does not exist when the --vo=gpu for example

Odd. I found this issue using mpv normally, although it's a bit rarer. I'm more likely to spot this issue with mpvpaper, as it's running all day long.

Also --vo=libmpv is not the issue here, it's pretty much --vo=gpu but in library form. Look at the mpv docs here: https://mpv.io/manual/master/#video-output-drivers-libmpv "This also supports many of the options the gpu VO has, depending on the backend." (which is OpenGL here)

hwdec=vaapi is where you should set your eyes on as hwdec=no "fixes" the issue (at least on my end).

notmentaloutlaw commented 1 year ago

yeah you are right it is the hardware acceleration that is the issue as if I just use the cpu it just works as intended. However, what baffles me is if I watch a 2 hour movie using mpv and hwdec=vaapi everything is fine there is rarely any graphical glitches. but running mpvpaper there is bound to be one within 5 mins.

GhostNaN commented 1 year ago

but running mpvpaper there is bound to be one within 5 mins

I have a similar feeling about that as well. Then again you aren't looping the same video for hours are you? Although, I've definitely had the same exact issue running some videos normally.