I want to merge two rtspsrc and scale their resolutions with the following command:
gst-launch-1.0 -e compositor name=m sink_0::xpos=0 sink_0::ypos=0 sink_1::xpos=650 sink_1::ypos=0 ! autovideosink rtspsrc location=rtsp://admin:robot@192.168.3.65:554/h264/ch1/main/av_stream ! rtph264depay ! h264parse ! decodebin ! videoconvert ! videoscale ! video/x-raw,width=640,height=360,framerate=25/1 ! m.sink_0 \
rtspsrc location=rtsp://admin:robot@192.168.3.66:554/h264/ch1/main/av_stream ! rtph264depay ! h264parse ! decodebin ! videoscale ! videoconvert ! video/x-raw,width=640,height=360,framerate=25/1 ! m.sink_1
but the result is not normal, there is no video image, May I ask if my command is wrong? thanks.
You may try this pure CPU version:
gst-launch-1.0 \
compositor name=mix \
sink_0::xpos=0 sink_0::ypos=0 sink_0::width=640 sink_0::height=360 \
sink_1::xpos=650 sink_1::ypos=0 sink_1::width=640 sink_1::height=360 \
! videoconvert ! queue ! autovideosink \
rtspsrc location=rtsp://admin:robot@192.168.3.65:554/h264/ch1/main/av_stream latency=500 ! application/x-rtp,media=video,encoding-name=H264 ! rtph264depay ! h264parse ! avdec_h264 ! videoscale ! video/x-raw,width=640,height=360,pixel-aspect-ratio=1/1 ! videorate ! video/x-raw,framerate=25/1 ! videoconvert ! queue ! mix.sink_0 \
rtspsrc location=rtsp://admin:robot@192.168.3.66:554/h264/ch1/main/av_stream latency=500 ! application/x-rtp,media=video,encoding-name=H264 ! rtph264depay ! h264parse ! avdec_h264 ! videoscale ! video/x-raw,width=640,height=360,pixel-aspect-ratio=1/1 ! videorate ! video/x-raw,framerate=25/1 ! videoconvert ! queue ! mix.sink_1
Also note that depending on HW accelerated plugins available on your platform, decodebin may choose a decoder not outputting into system memory, in such case you might have to copy/download into system memory.
thanks,I found that, depending on the performance of the platform, I was able to run it on windows