reStream icon indicating copy to clipboard operation
reStream copied to clipboard

Extra filters option

Open BWindey opened this issue 1 year ago • 1 comments

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 avatar Oct 05 '24 21:10 BWindey

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.

BWindey avatar Oct 21 '24 12:10 BWindey

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

coroa avatar Mar 14 '25 15:03 coroa

Whoops, this slipped my mind.

Well, thanks for poking me :smile:

rien avatar Mar 14 '25 15:03 rien