Skip to content

Conversation

@BWindey
Copy link
Contributor

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

@BWindey
Copy link
Contributor 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.

@coroa
Copy link

coroa commented Mar 14, 2025

@rien Hi, that's looking great actually. Anything against merging it now, half a year later :)

@rien
Copy link
Owner

rien commented Mar 14, 2025

Whoops, this slipped my mind.

Well, thanks for poking me 😄

@rien rien merged commit 46ea123 into rien:main Mar 14, 2025
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

3 participants