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

Extra filters option #108

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Extra filters option #108

wants to merge 4 commits into from

Conversation

BWindey
Copy link

@BWindey BWindey commented Oct 5, 2024

Implements the -e | --extra-filters proposed in #70 .

This will add the filter at the end of the program-set filters, because when testing with "negate" (#69 ), this seems to be the safer way.

Also fixed a missing comma (see fist commit)

Examples:
reStream.sh -e "avgblur=sizeX=12"
image

reStream.sh -e "negate"
image

reStream.sh -e "lutrgb=r='if(gte(val,0)*lte(val,85),255,0)':g='if(gte(val,85)*lte(val,170),255,0)':b='if(gte(val,170)*lte(val,255),255,0)'"
image
(I'll experiment to see if is possible to let ffmpeg convert grayscale to some simple colours on the fly)

Arguments should be comma-seperated. I don't know if it would be necessary to add a check in the shell-script to see if it is valid output, or if we would just let it fail and let the user figure out what exactly went wrong.

The reason this is a draft PR, is for the above reason, and because I altered the way brightness is controlled. Instead of setting the max colorlevels for each color to 1/8th of their max (29/255), I used the curves filter to set the threshold at 1/8 = 0.125. The result looks the same, but it reads easier. I would like feedback about that.

Closes #70

@BWindey BWindey marked this pull request as ready for review October 15, 2024 20:59
Copy link
Owner

@rien rien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Thanks for the contribution!

I will wait a few days to see if the original implementer of the filter for the rm2 responds, but if not you can poke me again and I'll merge.

reStream.sh Show resolved Hide resolved
@BWindey
Copy link
Author

BWindey commented Oct 21, 2024

There is now a comment explaining what curves do for ffmpeg in this scenario.

Maybe I need to specify that this closes #70 for Github to recognise it. I'll update the first comment.

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

Successfully merging this pull request may close these issues.

Add option to pass extra video filters
2 participants