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

add a srgb range/threshold to various effects #14255

Open
geextahslex opened this issue May 28, 2024 · 3 comments
Open

add a srgb range/threshold to various effects #14255

geextahslex opened this issue May 28, 2024 · 3 comments

Comments

@geextahslex
Copy link

geextahslex commented May 28, 2024

Expected behavior of the wanted feature

Hi, I would like to propose a handy feature to make various effects more tweakable by the user. Effects like glsl shader, lavfi filters, build in effects like saturation/brightness/contrast/gamma etc. I'm often face with this problem that I want to use a effect/filter but not on the entire image but on a specific range, like lows/highs/mids (0-255srgb).
There would need to be a smooth transition (smoothstep) between affected area and non affected, to no get a harsh line.
This would enhance our image quality and would open a door for more creative usage of effects. Add a new dimension of flexibility.

an example of what I'm actually talking about
lavfi denoise:
you don't need to apply the filter to the whole image. 90% of the noise is present in the lows 0-40srgb. Here I simulated this effect in photoshop. A better experience. You get rid of the noise in the lows but keep details in the mids, like the face etc.

normal image
noise
denoised with atadenoise
denoise
atadenoise applied only to srgb 0-40
denoise fusion

Thank you :)

Alternative behavior of the wanted feature

No response

Log File

No response

Sample Files

No response

@ruihe774
Copy link
Contributor

For glsl shaders, you can implement this feature in the shader code easily.

For lavfi filters, I believe this features can be implemented with a lavfi filtergraph. Alternatively you can just use VapourSynth. There are many existing VapourSynth scripts that can perform splitted processing based on luma.

@llyyr
Copy link
Contributor

llyyr commented May 28, 2024

As you've been told, this kind of thing is better implemented as a VS script or a shader. But if you really want to do this with a filtergraph you can probably use the colorkey filter to make the reds transparent then with an overlay filter, overlay a video with denoise applied to the whole thing

@geextahslex
Copy link
Author

geextahslex commented May 28, 2024

"easily" and "just use xyz" not every person is a coding prodigy. Here you can see how this stuff ends like, 8 months no answer.
https://www.reddit.com/r/mpv/comments/16w8vrg/mpv_and_vapoursynth_scripts/
I also don't want to install 55 other programs.

Thats why I made this feature-request, to have a native mpv solution and make this more accessible for everyone. Not rely on 3rd party stuff.

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

No branches or pull requests

3 participants