Just tested this with an AGX Orin running R36.3 and using a localhost RTSP server. Not tested whipsink, but the following seems ok:
gst-launch-1.0 -v \
rtspsrc location=rtsp://127.0.0.1:8554/test ! rtph264depay ! rtph264pay config-interval=-1 ! application/x-rtp,media=video,encoding-name=H264 ! queue ! selector.sink_0 \
rtspsrc location=rtsp://127.0.0.1:8554/test ! rtph264depay ! rtph264pay config-interval=-1 ! application/x-rtp,media=video,encoding-name=H264 ! queue ! selector.sink_1 \
input-selector name=selector ! queue ! fakesink dump=1
Note that in my case the H264 stream from RTSP server adds SPS/PPS (your config-interval may do the same when a Key frame happens) and also has an IDR interval of 15 for 30 fps so that a key frame is issued each 15 frames and receiver can quickly display.
What gives:
gst-discoverer-1.0 -v <your_rtsp_src>
You may also try adding h264parse
between rtph264depay
and rtph264pay
.
You may also try to run both pipelines with verbose mode (such as with gst-launch-1.0 -v) and carefully check for differences.
Does decoding/re-encoding help ?
gst-launch-1.0 -v \
rtspsrc location=rtsp://127.0.0.1:8554/test ! rtph264depay ! h264parse ! nvv4l2decoder ! queue ! nvv4l2h264enc insert-sps-pps=1 idrinterval=15 insert-vui=1 ! h264parse ! rtph264pay ! application/x-rtp,media=video,encoding-name=H264 ! queue ! selector.sink_0 \
rtspsrc location=rtsp://127.0.0.1:8554/test ! rtph264depay ! h264parse ! nvv4l2decoder ! queue ! nvv4l2h264enc insert-sps-pps=1 idrinterval=15 insert-vui=1 ! h264parse ! rtph264pay ! application/x-rtp,media=video,encoding-name=H264 ! queue ! selector.sink_1 \
input-selector name=selector ! queue ! fakesink dump=1
Note that Orin Nano has no encoder, so this wouldn’t work with this model. CPU encoding would work with something like:
gst-launch-1.0 -v \
rtspsrc location=rtsp://127.0.0.1:8554/test ! rtph264depay ! h264parse ! nvv4l2decoder ! queue ! nvvidconv ! video/x-raw,format=I420 ! x264enc key-int-max=15 tune=zerolatency ! h264parse ! rtph264pay ! application/x-rtp,media=video,encoding-name=H264 ! queue ! selector.sink_0 \
rtspsrc location=rtsp://127.0.0.1:8554/test ! rtph264depay ! h264parse ! nvv4l2decoder ! queue ! nvvidconv ! video/x-raw,format=I420 ! x264enc key-int-max=15 tune=zerolatency ! h264parse ! rtph264pay ! application/x-rtp,media=video,encoding-name=H264 ! queue ! selector.sink_1 \
input-selector name=selector ! queue ! fakesink dump=1
Also note that your videotestsrc case uses a very low resolution and framerate. If your rtsp cameras are streaming high resolution at high framerate, you might have to adjust bitrate, profile, level and maybe network sink buffer-size for UDP.