Border, shadow and rounded sources

Because of COVID-19 we have shifted many of shows to a videoconference format, leveraging NDI inputs and Skype’s native NDI support as our way to do shows and interviews. So far it has worked like a charm.

Now, I’m trying to achieve some things, like border, shadow and rounded video sources, like social network avatars, mostly as a proof of concept that I could implement in following shows.

Is there a way to achieve this in live video sources using MIXER commands or something? I’m open to ideas.

Just do overlays with alpha cutouts for the sources and resize the sources on layers beneath it with MIXER.

I’ve been thinking of using png cutouts and overlay them for borders and shadow, which I’ve tried and works fine so far, as long as transitions are direct cuts. But I have many shows which leverage transition times for transforms and crops, so this would mean I’d also have to manipulate the overlays transitions, transforms and crops if needed. It would take some time to have a show prepared for this, though.

Now, about rounded corners, how could I do that?

Yes, you can do masks using the red channel in the top contiguous layer as a key.

About the shadows, I would use templates to generate both the effects and the key for the composition.

Another way of doing that is loading the NDI sources as webcams into templates and cpmpositing them all at once, but it would overstress the system.

The cutout rounds the corner. You could also have a separate layer just to round the source (https://github.com/CasparCG/help/wiki/AMCP-Protocol#mixer-keyer). If you want to sync up MIXER transforms you’d use defer/commit.

As @hreinnbeck said you can use defere and commit or you could use a virtual channel where you build your composition and route the whole channel down to al layer on the output. You can then use the MIXER FILL commss as md to animate the whole thing ar once. Could be easier to do all the calculations.

This is an example using a live video input in a template with seriously.js effects applied:
box
You can composite many NDI sources into a big “webcam” canvas and place each of them inside a box or a circle.

1 Like

Here is that template modified to accommodate four inputs, each one into a different canvas inside a circle:

The template has some extra bits that a client makes use of located in helpers.min.js (I included the non-minified version). There are some files missing: gsap.min.js and CSSRulePlugin.min.js from GreenSock and seriously.js files. You can download them at GitHub.

The camera displaying there is an OBS output:


so you could easily input a couple of NDI streams into a grid there and crop each one in the template.

2 Likes