In another discussion, someone asked how to embed a video clip inside text, with another video as a background. To make the method easier to find, I duplicated my answer to put it here, in the Tutorial category.
We want to achieve something like this:
Here one method to do it:
Put to 2 video files in the Timeline.
The background video goes on track V1.
The video that will be INSIDE the text goes on track V2.
Next, you need to create a mask that will be used on the clip in track V2.
- Create another track (V3)
- Add a WHITE clip to that track. The length is not important.
- Add a Text: Simple filter to the white clip.
- Set text color to BLACK.
- Write your own text and choose it’s Size and Position.
- Go to File > Export > Frame…
- Give a name to the file (for example: text-mask) and Save.
- You don’t need the Text clip anymore, so hide track V3. I suggest you don’t delete it though. You might need it again in your project for another mask.
Now that you have a mask, select the video clip on V2 and:
- Add a Mask: From File filter.
- Go to the File drop-down menu and choose Custom.
- In the windows that pops up, navigate to where you save the mask.
- Select the mask file and click on the Open button.
In the final result, oblique and/or rounded lines in the text edges could be “saw-toothed”.
You can use the Softness setting in the Mask: From File filter to attenuate these teeth, but it won’t have a significant effect.
Changing Softness to 100%
To completely remove the jagged edges, add blur to your Text clip before you export it
- Create your Text clip as explained above
- Add a Blur: Gaussian filter
- Set the Amount to 3%
- Go to File > Export > Frame and save your mask file
- In the Mask: From File filter, go to File > Custom and select the new blurred mask file.
Using the original unblurred mask, and Softness set and 100% (zoom at 300% in the Preview)
Using the blurred mask, and Softness set and 60%