Rtspsrc has different CPU load for its latency

Hi,

I’ve been testing gstreamer pipeline to play much of RTSP live stream, and found that if latency property of rtspsrc is set to 0, pipeline has much CPU load than the latency is set to 1000, about 1.5 times higher.

Here is the pipelines I’ve tested:

gst-launch-1.0 rtspsrc location="rtsp://xxx.xxx.xxx.xxx:xxxx" latency=0 drop-on-latency=true buffer-mode=0 protocols=4 short-header=true ! rtph264depay ! h264parse ! fakesink sync=true
gst-launch-1.0 rtspsrc location="rtsp://xxx.xxx.xxx.xxx:xxxx" latency=1000 drop-on-latency=true buffer-mode=0 protocols=4 short-header=true ! rtph264depay ! h264parse ! fakesink sync=true

Tested RTSP stream is:

  • Resolution: 1920x1080
  • Codec: H264
  • Framerate: 30
  • Bitrate: 4Mbps

Is there any possible way to make CPU load lower to latency=1000 case?

You’d have to use a profiler to understand why the latency affects the CPU usage, and then that part will have to be optimized one way or another. This also seems like something that should be tracked in a gitlab issue.

1 Like