Run the pipeline from the python "merger" element at https://github.com/exmakhina/gstreamer-examples:
git clone https://github.com/exmakhina/gstreamer-examples
export GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD/gstreamer-examples/plugins
export GST_DEBUG=*:3,python:5
gst-launch-1.0 merger_py name=remap ! queue name=q_out ! "video/x-raw,format=(string)RGBA,width=4096,height=2048" ! videoconvert ! videorate ! "video/x-raw,format=(string)I420" ! vaapiencode_h264 rate-control=2 bitrate=6000 ! h264parse ! flvmux name=mux ! fakesink videotestsrc name=cam_l ! queue name=q_l ! "video/x-raw,width=1920,height=1080,format=(string)RGBA" ! remap.sink_l videotestsrc is-live=true name="cam_r" ! queue name=q_r ! "video/x-raw,width=1920,height=1080,format=(string)RGBA" ! remap.sink_r alsasrc ! queue name=q_aenc ! voaacenc ! mu.x
Notice the time spent pushing buffers, don't know why: https://github.com/exmakhina/gstreamer-examples/blob/master/plugins/python/merger.py#L196