Open BanchouBoo opened 2 months ago
Can you share a sample of this?
..I did? There are three labeled screenshots attached to the post.
I mean the actual source not screenshots.
Here is the raw image file of the page from the cbz archive, is that what you mean?
Looks fine to me when using this page against itself for double page mode. Certainly nothing like your screenshot.
Any chance I could get your mpv.conf? I played around with my settings a bit, only thing that seemed to change the rendering was the vo
setting. I have it as gpu-next
normally.
gpu
is slightly washed out but adds other unpleasant artifacts. x11
as the value makes single pages look correct but double is still washed out.vaapi
looks the same for single and double but adds even worse artifacting than gpu
does.kitty
is, annoyingly, the only one that is completely correct for both single and double but that is generally buggy in other ways and I also just don't want to use my terminal for this.This was with no relevant rendering settings. Just the defaults. This page has a pretty big resolution, so I suppose you're probably downscaling a lot more than me (my screen is 4k).
You're right that part of the problem is downscaling. I was able to get much better rendering (close to and better than mcomix) for single pages with the settings below, but double page rendering is still very washed out. It can't just be scaling, I tried taking two pages and combining them into one image and that renders correctly, so I'd assume it has to be something going on with the lavfi filters but I don't know much (anything, really) about those so I couldn't guess as to what nor would I know where to start to try and troubleshoot it myself.
dscale=ewa_lanczos
# 2.2 is closer to mcomix and better preserves small details like tiny individual dots, while 2.5
# blends them together more for a bit of a smoother look and also eliminates more artifacts
dscale-blur=2.5
# for vo=gpu-next
libplacebo-opts=downscaler=custom,downscaler_preset=ewa_lanczos,downscaler_blur=2.5
no-correct-downscaling
no-linear-downscaling
Can you try double page mode but without scaling the window? I'm not sure if your WM/DE will allow that, but I'd be curious if you notice any difference there in terms of visual output.
adding video-unscaled=yes
to the config might help with that
It does look normal unscaled. So scaling is definitely still a factor. Something about how the lavfi filters and downscaler interact, I guess?
https://github.com/Dudemanguy/mpv-manga-reader/assets/32691832/c3d5ff98-62a4-4b02-8813-f2babebceb47
I forgot how the scaling pipeline works with ffmpeg filters but evidently something weird must be happening here. Intuitively, I'm not sure why it would be causing a difference at all. In theory, all that the filter does is an hstack to put the images together (minus necessary scaling in certain cases because of mismatched image dimensions but this should not be relevant) and then mpv scales it later. Can't say I've noticed anything when upscaling (rarely I need to downscale), but maybe there's a similar problem.
For what it's worth, I tried this out on my 1080p laptop and couldn't reproduce. Looks fine here.
Images in double page mode are extremely washed out. Also true to a lesser extent in single page mode/without the plugin but that is unrelated to the script itself (if you have solutions for that though I'm all ears). Some image comparisons below. I've ensured that the brightness, contrast, etc are all default in both mpv and mcomix before taking these screenshots. I also checked on mpv master to make sure it wasn't related to https://github.com/Dudemanguy/mpv-manga-reader/issues/21 but it looks the same there too.
mcomix:![mcomix](https://github.com/Dudemanguy/mpv-manga-reader/assets/32691832/5e40f288-7701-4c4f-bd85-41e68030fcf4)
mpv without script/in single page mode:![mpv-manga-single](https://github.com/Dudemanguy/mpv-manga-reader/assets/32691832/4d1ca098-e316-4bf7-91e7-ae9a946972ec)
mpv in double page mode (but cropped to a single page for easier comparison):![mpv-manga-double](https://github.com/Dudemanguy/mpv-manga-reader/assets/32691832/eb33ba32-cce7-467e-8878-78d6014e488b)