[FFmpeg-user] Problem with colorhold filter

John Riselvato jdriselvato at gmail.com
Sat May 16 18:51:49 EEST 2020


This is a known bug. You'll just have to use it multiple times before you
get it to actually remove all the colors.
http://johnriselvato.com/ffmpeg-how-to-remove-all-colors-except-one-from-a-video/

On Sat, May 16, 2020 at 3:41 AM Michael Koch <astroelectronic at t-online.de>
wrote:

> Hi,
>
> I just found out that the colorhold filter doesn't behave as described.
> In the documentation is written:
> similarity
> Similarity percentage with the above color. 0.01 matches only the exact
> key color, while 1.0 matches everything.
>
> But when I use similarity=1.0, it matches a wide range of colors, but
> not everything. Can be reproduced as follows:
>
> ffmpeg -f lavfi -i color=black:s=1280x256 -vf
> geq=r='clip(512-X,0,255)+clip(X-1024,0,255)':g='lt(X,512)*clip(X,0,255)+gte(X,512)*clip(1024-X,0,255)':b='lt(X,1024)*clip(X-512,0,255)+gte(X,1024)*clip(1536-X,0,255)',oscilloscope=tw=1:s=1
>
> -frames 1 -y spectrum.png
>
> ffmpeg -i spectrum.png -filter_complex
> colorhold=color=00FF00:similarity=1.0:blend=0 -y out.png
>
> Michael
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list