mpv-player / mpv

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

SwayWM causes mpv to give an aliased output. #14422

Closed krazyguy97 closed 5 days ago

krazyguy97 commented 6 days ago

mpv Information

mpv v0.38.0-dirty Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
 built on May 23 2024 10:29:03
libplacebo version: v6.338.2
FFmpeg version: n6.1.1
FFmpeg library versions:
   libavutil       58.29.100
   libavcodec      60.31.102
   libavformat     60.16.100
   libswscale      7.5.100
   libavfilter     9.12.100
   libswresample   4.12.100

Other Information

Reproduction Steps

Attempt to use mpv with the --vo=dmabuf-wayland argument on a low resolution video while running Sway. (this is where it is most noticeable) The output should be aliased with nothing to fix it except switching to another vo option.

Expected Behavior

No aliasing using dmabuf-wayland.

Actual Behavior

dmabuf-wayland caused aliasing artifacts to appear.

Log File

output.txt

Sample Files

https://github.com/mpv-player/mpv/assets/114841483/9857fb3d-d2b3-450b-b59a-ac1883866af2

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

Dudemanguy commented 5 days ago

[ 0.136][v][vo/dmabuf-wayland] Window size: 1362x218 (Borders: l=0 t=0 r=0 b=0)

Are you scaling the video to this weird size in your testing?

krazyguy97 commented 5 days ago

[ 0.136][v][vo/dmabuf-wayland] Window size: 1362x218 (Borders: l=0 t=0 r=0 b=0)

Are you scaling the video to this weird size in your testing?

I was doing the logging in a window, while i had other things on the screen. I can test on a 1080p display if you want me to. Fullscreen would give the same issue.

Dudemanguy commented 5 days ago

Oh okay there's no bug then. I wasn't sure if you meant a non-scaled window. dmabuf-wayland uses purely compositor-side scaling. It will be low quality in most cases. Use gpu or gpu-next if you want quality.

krazyguy97 commented 5 days ago

I understand. Thanks for clarifying.

Dudemanguy commented 5 days ago

In theory there is nothing stopping a compositor for using something fancier although most would not have any reason to do that. I think sway uses bilinear for non-integers if I remember right.

krazyguy97 commented 5 days ago

labwc or basically any other compositor did not have this issue. its only sway for some reason but oh well, its fine

CounterPillow commented 5 days ago

Where did you hear about the dmabuf-wayland VO that made you want to use it? This isn't the first time someone complained of the intended low quality, so somewhere people are finding out about it existing without knowing what it is or does, and misinformation should be corrected at the source.

krazyguy97 commented 5 days ago

I only used dmabuf-wayland because it resulted in lower power usage on my setup.

Dudemanguy commented 5 days ago

I only used dmabuf-wayland because it resulted in lower power usage on my setup.

Well that's the intended purpose at least.

llyyr commented 5 days ago

Set scale_filter linear for the output in your sway config

krazyguy97 commented 4 days ago

Set scale_filter linear for the output in your sway config

You sir, are a lifesaver 😂😂