dyne / frei0r

A large collection of free and portable video plugins
https://frei0r.dyne.org/
GNU General Public License v2.0
419 stars 90 forks source link

Add pixel-sorting filter #100

Closed sjbarag closed 1 year ago

sjbarag commented 4 years ago

Not sure if new filters are welcome, but I figured I'd submit something I've been hacking on lately!

s0rter is a filter that sorts each frame's pixels by hue, saturation, and lightness (in order of decreasing priority), producing a rainbow-like effect that's especially interesting for frames of animated content with a limited color palette. While it's not configurable in this iteration, it can easily be extended to support arbitray hue/saturation/lightness ordering.

For a given input (here an SMPTE test pattern generated by ffmpeg -f lavfi -i smptebars -t '0.0333' smpte.mp4): smpte001

the s0rter filter produces this output (via FREI0R_PATH=./src/filter/s0rter/ ffmpeg -i smpte.mp4 -vf "frei0r=filter_name=s0rter" smpte.s0rted.mp4): smpte001 sorted

sjbarag commented 3 years ago

Just bumping this PR since it's been a while :smiley:

jaromil commented 1 year ago

closing for lack if activity, please re-open whenever you are back in this @sjbarag