Setup Backgroung in nvoverlaysink

You may try the following.
You would need to know your display resolution. You can get it from xrandr. Here I’m using a 3440x1440 display, you would adapt for your case.
The first pipeline uses videotestsrc with black pattern for making the background.
The second and third pipelines simulate your sources, I have adjusted first source width from 959 to 960 as odd widths would generate warnings.
Then nvcompositor does the layout, and this is finally passed to nvoverlaysink for display.
It may not be required for your case, but if having overlapping areas and alpha composing, you would use zorder property of each sink similar as overlay property of nvoverlaysink.

gst-launch-1.0 -v \
   videotestsrc pattern=black ! video/x-raw,width=320,height=240,framerate=30/1 ! nvvidconv ! queue ! comp.sink_0  \
   videotestsrc ! video/x-raw,width=960,height=540,framerate=30/1 ! nvvidconv ! queue ! comp.sink_1  \
   videotestsrc pattern=colors ! video/x-raw,width=960,height=540,framerate=30/1 ! nvvidconv ! queue ! comp.sink_2 \
   nvcompositor name=comp sink_0::width=3440 sink_0::height=1440 sink_1::xpos=0 sink_1::ypos=270 sink_1::width=960 sink_1::height=540  sink_2::xpos=960 sink_2::ypos=270 sink_2::width=960 sink_2::height=540 ! nvvidconv ! nvoverlaysink
1 Like