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

Images are washed out in double page mode #29

Open
BanchouBoo opened this issue Jun 23, 2024 · 13 comments
Open

Images are washed out in double page mode #29

BanchouBoo opened this issue Jun 23, 2024 · 13 comments

Comments

@BanchouBoo
Copy link

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 #21 but it looks the same there too.

mcomix:
mcomix

mpv without script/in single page mode:
mpv-manga-single

mpv in double page mode (but cropped to a single page for easier comparison):
mpv-manga-double

@Dudemanguy
Copy link
Owner

Can you share a sample of this?

@BanchouBoo
Copy link
Author

..I did? There are three labeled screenshots attached to the post.

@Dudemanguy
Copy link
Owner

I mean the actual source not screenshots.

@BanchouBoo
Copy link
Author

Here is the raw image file of the page from the cbz archive, is that what you mean?
Bloom Into You - c001 (v01) - p010  Digital-HD   danke-Empire

@Dudemanguy
Copy link
Owner

Looks fine to me when using this page against itself for double page mode. Certainly nothing like your screenshot.

@BanchouBoo
Copy link
Author

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.

@Dudemanguy
Copy link
Owner

Dudemanguy commented Jun 24, 2024

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).

@BanchouBoo
Copy link
Author

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

@Dudemanguy
Copy link
Owner

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.

@McBaws
Copy link

McBaws commented Jun 24, 2024

adding video-unscaled=yes to the config might help with that

@BanchouBoo
Copy link
Author

BanchouBoo commented Jun 24, 2024

It does look normal unscaled. So scaling is definitely still a factor. Something about how the lavfi filters and downscaler interact, I guess?

2024.06.24-19.06.01.mp4

@Dudemanguy
Copy link
Owner

Dudemanguy commented Jun 25, 2024

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.

@Dudemanguy
Copy link
Owner

For what it's worth, I tried this out on my 1080p laptop and couldn't reproduce. Looks fine here.

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

No branches or pull requests

3 participants