Two videos overlayed with gstreamer alpha, not playing at all

202 Views Asked by At

I am trying to crate a greenscreen application using gstreamer alpha. I am using ximagesrc to capture the window with a green background. Then I am using alpha to overlay green parts of the capture. However, I even do not know the reason, the new video seems to not playing. Is this about codecs, or is there some kind of synchronization issue between two videos?

I also included a timeoverlay and it is stuck at zero. So, the new video is not playing at all. Then I used two different patterns of videotestsrc and saw the video is playing.

My pipeline is:

gst-launch ximagesrc xname=Some\ Green\ Screen\ App ! videoscale ! video/x-raw-rgb ! timeoverlay ! decodebin2 ! alpha method=green ! videomixer name=mixer  ! ffmpegcolorspace ! autovideosink videotestsrc pattern=snow ! videoscale ! video/x-raw-rgb, width=800, height=480 ! alpha ! mixer.

A playing example with no ximagesrc:

gst-launch videotestsrc ! videoscale ! video/x-raw-rgb ! timeoverlay ! alpha method=green ! videomixer name=mixer ! ffmpegcolorspace ! autovideosink videotestsrc pattern=snow ! videoscale ! video/x-raw-rgb ! alpha ! mixer.

When I used this pipeline, I expect an overlayed video, "playing". I see an output, which includes a frame of overlayed video, but it is not playing.

0

There are 0 best solutions below