Hi,
The Misc > backgroundkey effect looks like something I’d be interested in, but it doesn’t seem to do anything for me, and the documentation is pretty sparse. Can anyone enlighten me on how to use this effect?
Hi,
The Misc > backgroundkey effect looks like something I’d be interested in, but it doesn’t seem to do anything for me, and the documentation is pretty sparse. Can anyone enlighten me on how to use this effect?
I’ve tried it myself and I’m stumped… I even looked into the FFMPEG docs and haven’t gotten more insight.
What are you hoping to do?
Edit:
I gave it a go, and it seems to be some kind of very rough/rudimentary background separation…
I also asked Claude.ai, and got this answer:
The FFMPEG backgroundkey filter is a video filter used for chroma keying or “green screening” in video processing, but with a specific approach.
Unlike traditional chroma key filters that require you to specify a particular color to remove, the backgroundkey filter automatically determines what constitutes the “background” in a video. It works by analyzing which pixels remain relatively static across frames, assuming these represent the background.
The core functionality of backgroundkey:
- It identifies static (unchanging) pixels in the video as potential background
- It creates an alpha mask based on this identification
- It removes the detected background, leaving you with foreground elements that can be composited onto other footage
Thanks! Yes, that’s what I thought it did, but I could never get it to actually do anything. I’ll give it another go with the same settings you used.
Just may sure you play the clip in the Timeline. You won’t sew the ffect if the Timeline is paused.
Well, no matter what I do, I can’t get it to do anything. I’m using the AppImage and I think there might be a bug… not sure.
Might be… I’m on Windows.
I’d try filing a report.
In any case, the new object separation / background separation plugin might be better suited for this kind of thing.
It seems unlikely there’s a platform-specific problem with this - and if there somehow was, it would almost surely be with your libav build, not something in kdenlive as such.
My first guess would be that what you’re trying to apply it to doesn’t have the kind of static background that this can detect (even if it ‘looks’ static to you).
If you can share an example file that you’re trying to use it with, and the settings that you’ve tried to use with that file, then someone might be able to say something a little more concrete. Without a reproducer, and specific details of what you’re doing that Doesn’t Work, there’s not enough to point at where your problem is here.
I have a small sample project on my server that illustrates the problem. It’s a 7.4MB download at kdenlive-background-key.zip
Note that I already finished the video because I have a green screen, but I’m just using it to explore how backgroundkey might work.
Ok, I can confirm that I can’t get any joy out of that effect with the 25.04.0 appimage, or the current build in my active -dev branch …
@candidexmedia does the sample project work for you? If so, which kdenlive version / windows build are you using?
FWIW, it also doesn’t work for me with kdenlive-24.12.3-x86_64.AppImage
Yeah, nothing in the kdenlive code itself should have changed related to this, my top contenders for explaining it right now: we’re still using it ‘wrong’ - or something to do with libav version/build options.
Does it still not work if you move the camera closer to the greenscreen, so that it fills the whole background like the example that did work above?
I haven’t had time to shoot video with just a greenscreen background, but IMO the whole point of the effect is to work without a greenscreen.
I did open my sample project and apply a transform effect before the background key effect that zoomed in to just the green screen part, and the background key still had no effect. This should be equivalent to shooting zoomed-in video, right?
Well, I decided to officially open a bug.