On Wed, Jun 19, 2024 at 1:54 AM Erik Beck <ba...@tahoma.com> wrote:

> Hi all,
>
> I'm having conceptual issues using the backgroundkey filter.
>
> Is it intended to take a still image of a static background and remove
> it from a video stream? If so, I could use help with the filter syntax.
> If not, I need to be set straight.
>

backgroundkey filter uses single input only video stream and produces
single output only video stream,
and uses also scene detection to update alpha mask, this is controlled by
the filter threshold option.

Demo:

ffmpeg -i https://media.xiph.org/video/derf/y4m/bowing_cif.y4m -vf
"backgroundkey=threshold=0.2:similarity:0.02[v];color=s=cif:c=lime[c];[c][v]overlay=format=yuv422,format=yuv422p"
out.y4m


The more trivial, rudimentary technique, taking single still image of
supposed background and produce alpha mask with combination of input video,
is also possible, but not with backgroundkey filter, instead using several
different video filters in non-trivial combination...



>
> Thanks!
>
> Erik
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to