Hi,
I’m trying to build a pipeline in gstreamer that overlays multiple video streams from v4l2src and udpsrc+rtpvrawdepay on a background image where one of the streams is alpha masked with an image. Digging through the documentation and Stack Overflow didn’t show any (obvious) plugins or examples that describe this case. E.g. the alpha plugin does chroma keying, but I’d like to use a png image to define the regions being masked in the stream.
In ffmpeg I would use a complex filter to overlay video streams onto a background image with alphaextract and alphamerge to mask one of the stream:
ffmpeg -i input1.mp4 -i input2.mp4 -i background.png -i mask.png -filter_complex "[0:v]scale=640:480:force_original_aspect_ratio=decrease[camera];[3]alphaextract[mask];[1][mask]alphamerge[crop];[crop]scale=1800:1012:force_original_aspect_ratio=decrease[stream];[2][camera]overlay=40:300[canvas];[canvas][stream]overlay=650:100" output.mp4
Any help pointing me in the right direction would be much appreciated!