Use movie clip mask for video cropping

Hello,

I have a mask set for a video clip, and I would like to crop this clip using the (bounding box of the) mask as the new clip boundaries. Basically, I want to extract some moving part from a video.

NB: The mask is animated.

It is a clip mask, not a Node’s Box Mask, though even with the latter I did not find how to achieve this (crop node does not take crop size as a linkable parameter). I may consider to write some Python if it is the only way, with a bit of help about which APIs to look at.

Thanks.

Add node > Input > Mask. Choose the Movie Clip mask.

To delay playback of movie clip and mask you can adjust the movie clip offset value (source in point) or the Start value (Timeline in point) in Footage Settings (N key in MCE)

But how do I use the output of this node to crop my video clip?

I’m not talking about multiplying the clip times the mask. I’m talking about going from a full size clip to a cropped size clip. Without the black contour that’d frame the video if I were using multiply, if you will.

The project dimensions are NOT dynamic and therefore cannot be animated. You will have to adjust those parameters in the Scene Properties panel.

You could try hooking up a Crop Node but the values are not easily driven (no sockets) and you would have to save the output via a File node to use the new dimensions instead of project dimensions.

Indeed, there is no socket, that’s what I meant by “crop node does not take crop size as a linkable parameter”.
My mask is a rectangle with a fixed size, but which is moving to follow some object. I want to translate the clip by the opposite of this move so that the masked object remains fix in the output scene, while it was moving in the input clip.

Would you consider using the plane track function in the MCE and the Plane Deform node for this?