I'm trying to superimpose a video over another video by using the mfw_isink element in gstreamer. I can't find out how to specify which video should be present on top and which video should be present below. Even the documentation provided in Linux_Multimedia_Framework_Docs_MX6X does not specify how to do that. One thing i noticed is that whichever VS is created last is present on top. For example if 2 overlays VS0 (0,0-800,800:800x800) and VS1 (200,200-1000,1000:800x800) are created in the same order, The video present in VS1 superimposes on top of the video present in VS0. The pipelines I'm using are
gst-launch videotestsrc ! mfw_isink display=master axis-left=0 axis-top=0 disp-width=800 disp-height=800 videotestsrc ! mfw_isink display=master axis-left=200 axis-top=200 disp-width=800 disp-height=800 rotation=1
gst-launch videotestsrc ! mfw_isink display=master axis-left=0 axis-top=0 disp-width=800 disp-height=800 videotestsrc ! mfw_isink display=null display-1=master axis-left-1=200 axis-top-1=200 disp-width-1=800 disp-height-1=800 rotation-1=1
By repeatedly running either of the above pipelines, sometimes i get the rotated video to be present on top. This is because, for that instance VS0 contains video in window (200,200-1000,1000:800x800) and VS1 contains video in (0,0-800,800:800x800). I don't know why this happens but this happens randomly. I want know how to make the rotated video appear on top of the other video. Or is there anyway to specify which overlay should be created first (or present in top/bottom)? Any comments or suggestions are welcome. Thank you.
export VSALPHA=1
gst-launch videotestsrc ! mfw_isink axis-top=0 axis-left=0 disp-width=320 disp-height=240&
gst-launch videotestsrc pattern=9 ! mfw_isink axis-top=0 axis-left=320 disp-width=320 disp-height=240&
gst-launch videotestsrc pattern=10 ! mfw_isink axis-top=240 axis-left=0 disp-width=320 disp-height=240&
gst-launch videotestsrc pattern=15 ! mfw_isink axis-top=240 axis-left=320 disp-width=320 disp-height=240
If I split the pipeline into two (or more) as you said, the first run command is always at the bottom. What you have suggested is more of a fix and not a solution. But in my case, I'm required to execute both the pipelines as one. So I was expecting a way to explicitly mention which overlay to be put in which layer.
BiyongSUN Take your own example. Would it be possible to make the third pipeline to be on the second overlay, without changing the order in which the commands are executed? i.e pattern 9 should be on top of pattern 10.
try gst-launch-1.0 overlaysink in 3.10.53 release