1

I am using kurento media server for video broadcasting, my use case is to input two video streams and apply chroma key on the top video and then display the chroma-keyed video on the other video stream.

I am planning to use the kurento chroma key filter module, which takes the video and a image uri as input parameters and apply chroma key on video and then displays it on top of supplied image.

Is it possible to display the chroma keyed video on top of another video instead of the image?

OR

If not, Is there any other way i can achieve this?

I do not have significant knowledge in gstreamer framework. It would be great if someone can point me in the right direction.

piyush
  • 868
  • 13
  • 29

1 Answers1

1

You can use videomixer(compositor?) / glvideomixer which is able to work with alpha.

The videomixer can do the merging of two inputs together in many ways (picture in pictuire - whatever)..

For chroma key you can use alpha element - you can do chroma key on color or just go with green - whatever..

This is the magic pipe where you can see the moving snow pattern under the green bars which are now transparent:

gst-launch-1.0 videotestsrc pattern=snow ! mixer.sink_0 \
  videotestsrc pattern=smpte75 ! alpha method=green ! mixer.sink_1 \
  videomixer name=mixer sink_0::zorder=0 sink_1::zorder=1 ! \
  videoconvert ! autovideosink

I just copy pasted from here.

enjoy :)

nayana
  • 3,787
  • 3
  • 20
  • 51