How to use rtspclientsink to process rtsp video streams

I use mediamtx(rtsp-simple-server) on windows to build the rtsp server, and then use gstreamer to merge multiple rtsp video streams, and then push the stream, the command is as follows:

gst-launch-1.0 -ve rtspclientsink location=rtsp://localhost:8554/mystream compositor name=m sink_0::xpos=0 sink_0::ypos=0 sink_1::xpos=650 sink_1::ypos=0 ! videoconvert ! x264enc ! h264parse ! rtph264pay name=pay0 pt=96 rtspsrc location=rtsp://admin:robot773@192.168.3.65:554/h264/ch1/main/av_stream ! rtph264depay ! h264parse ! decodebin ! videoscale ! video/x-raw,width=640,height=360,framerate=25/1 ! videoconvert ! m.sink_0 rtspsrc location=rtsp://admin:robot773@192.168.3.66:554/h264/ch1/main/av_stream ! rtph264depay ! h264parse ! decodebin ! videoscale ! video/x-raw,width=640,height=360,framerate=25/1 ! videoconvert ! m.sink_1

Now the problem is the output error:

ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3175): gst_base_src_loop (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0:
streaming stopped, reason not-linked (-1)
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc1/GstUDPSrc:udpsrc2: Internal data stream error.
Additional debug info:
../libs/gst/base/gstbasesrc.c(3175): gst_base_src_loop (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc1/GstUDPSrc:udpsrc2:
streaming stopped, reason not-linked (-1)
Execution ended after 0:00:04.082819500
Setting pipeline to NULL ...

I am now confused how to handle rtsp data, real can be received by rtspclientsink.

With this change, the following command can work,With this change, the following command works, but I still can’t find the exact data type specification for rtspclientsink::

gst-launch-1.0 compositor name=m sink_0::xpos=0 sink_0::ypos=0 sink_1::xpos=650 sink_1::ypos=0 ! videoconvert ! x264enc ! h264parse ! rtspclientsink location=rtsp://localhost:8554/mystream rtspsrc location=rtsp://admin:robot773@192.168.3.65:554/h264/ch1/main/av_stream ! rtph264depay ! h264parse ! decodebin ! videoscale ! video/x-raw,width=640,height=360 ! videoconvert ! m.sink_0 rtspsrc location=rtsp://admin:robot773@192.168.3.66:554/h264/ch1/main/av_stream ! rtph264depay ! h264parse ! decodebin ! videoscale ! video/x-raw,width=640,height=360 ! videoconvert ! m.sink_1

You may use:

gst-inspect-1.0 rtspclientsink

and look at SINK pads for supported types/formats.