• Hardware Platform (GPU RTX 2080)
• DeepStream SDK 5.1
• JetPack Version (valid for Jetson only)
• TensorRT Version 7.2.2 + CUDA 11.2
• NVIDIA GPU Driver Version (460.32.03)
I’m now trying to compare the transcoding performance between GStreamer and DeepStream. The idea is really simple, I’ve constructed 2 pipelines respectively in GStreamer and DeepStream to transcode the same udp camera sources (2 sources), and then I checked respectively their latency.
Pipeline in GStreamer:
gst-launch-1.0 -e udpsrc address=239.38.36.26 port=60060 caps ="application/x-rtp, me-dia=(string)video,payload-type=(int)96, clock-rate=(int)90000, encoding-name=(string)H264" ! queue max-size-buffers=20000 ! rtpjitterbuffer mode=0 ! rtph264depay ! avdec_h264 ! videoconvert ! avenc_mpeg4 bitrate=8000000 ! rtpmp4vpay pt=101 config-interval=1 ! udpsink host=239.1.1.1 port=50000 udpsrc address=239.33.36.13 port=37004 caps ="application/x-rtp, me-dia=(string)video,payload-type=(int)98, clock-rate=(int)90000, encoding-name=(string)H264" ! queue max-size-buffers=20000 ! rtpjitterbuffer mode=0 ! rtph264depay ! avdec_h264 ! videoconvert ! avenc_mpeg4 bitrate=8000000 ! rtpmp4vpay pt=101 config-interval=1 ! udpsink host=239.1.1.1 port=50000
Another pipeline in DeepStream who transcodes just the same sources but take advantage of the GPU.
gst-launch-1.0 udpsrc address=239.38.36.26 port=60060 caps = "application/x-rtp, media=(string)video,payload-type=(int)98, clock-rate=(int)90000, encoding-name=(string)H264" ! queue ! rtpjitterbuffer ! rtph264depay ! h264parse ! nvv4l2decoder ! nvvideoconvert ! nvv4l2h264enc ! rtpĥ264pay ! udpsink host=239.1.1.1 port=50000 address=239.33.36.13 port=37004 caps = "application/x-rtp, media=(string)video,payload-type=(int)98, clock-rate=(int)90000, encoding-name=(string)H264" ! queue ! rtpjitterbuffer ! rtph264depay ! h264parse ! nvv4l2decoder ! nvvideoconvert ! nvv4l2h264enc ! rtph264pay ! udpsink host=239.1.1.1 port=50000
So at the begaining I took it for granted that the second pipeline constructed in DeepStream will show much lower latency compared with the one constructed in GStreamer. But what surprised me is that, the DeepStream pipeline finally got a latency which is several times of the GStreamer pipeline! The latency in DeepStream is around 0.25s for the first source, and around 0.5s for the second source, while in GStreamer the latencie are just around 0.08s for the both!
I’ve also added more sources (3,4,5,etc.) to try to retieve the advantage of the GPU. (I imagin that in the case of 1 or 2 sources, the PC need to take time to transfer the data from machine to the GPU, so this may can explain why the CPU seems faster, but after adding more sources, the CPU will be blocked and the GPU’s transcoding performance would remain at a stable level).
But the result is the same! No matter how many sources added, DeepStream pipeline present always a much higner latency that GStreamer! How could explain this?