Custom shape picture-in-picture

I’ve seen tutorials on how to do a picture-in-picture video, but what I need is a custom, complex shape as a template. Consequently, simply using two video tracks and shrinking the size of the top one does not work for me. I need both videos to be full size, but I need to apply a positive mask to only show the negative part of the bottom video and a negative mask to only show the positive part of the top video. For example, maybe I want the “mask” to be two circles. I’d want the bottom video to show the negative space around the two circles and the top video to show the positive space around the two videos.

I played around a little with the chroma filter. I can get that to work with showing the positive or negative space around a single track (one track for mask and one track for video), but what I’ve not been able to figure out is how to combine the two sets into a final product where both are visible (the negative space from one and the positive space from the other).

Does that make sense? Can this be done in Shotcut?

1 Like