[FFmpeg-user] Remove everything but a single color (range)

Carl Eugen Hoyos ceffmpeg at gmail.com
Wed Mar 18 03:22:26 EET 2020

Am Di., 17. März 2020 um 00:38 Uhr schrieb Hans Carlson <forbyta at gmx.com>:
> Can anyone explain to me why this displays only the yellow bar with
> everything else black:
>    ffplay -f lavfi -i 'smptehdbars=duration=5' -vf "colorhold=color=0xbcc906:similarity=0.25,chromakey=color=black:similarity=.2"
> but this displays all bars in gray scale except the yellow bar which is
> in color:
>    ffmpeg -f lavfi -i 'smptehdbars=duration=5' -vf "colorhold=color=0xbcc906:similarity=0.25,chromakey=color=black:similarity=.2" TEST-smptehdbars-yellow-only.mkv
> What I want is ONLY the yellow bar and everything else black, as in the
> ffplay command.  How can I get the same thing with ffmpeg?

You need to also use the overlay filter.

Carl Eugen

More information about the ffmpeg-user mailing list