RidgeRun / gst-interpipe

GStreamer plug-in for interpipeline communication
Other
140 stars 63 forks source link

Gst-launch-1.0 increase memory usage gradually in Jetson Nano #119

Open thaint2901 opened 2 years ago

thaint2901 commented 2 years ago

I use gst-launch with the following pipeline:

gst-launch-1.0 uridecodebin  uri=rtsp1 ! nvvideoconvert ! interpipesink name=src_0 \
  uridecodebin uri=rtsp2 ! nvvideoconvert ! interpipesink name=src_1 \
  uridecodebin uri=rtsp3 ! nvvideoconvert ! interpipesink name=src_2 \
  uridecodebin uri=rtsp4 ! nvvideoconvert ! interpipesink name=src_3 \
  interpipesrc stream-sync=restart-ts name=interpipesrc0 listen-to=src_0 ! m.sink_0 \
  nvstreammux name=m batched-push-timeout=40000 batch-size=4 width=1920 height=1080 live-source=1 ! nvinfer config-file-path=infer_arm.txt ! nvmultistreamtiler rows=2 columns=2 width=1280 height=720 ! nvvideoconvert ! nvdsosd ! nvegltransform ! nveglglessink sync=false \
  interpipesrc stream-sync=restart-ts name=interpipesrc1 listen-to=src_1 ! m.sink_1 \
  interpipesrc stream-sync=restart-ts name=interpipesrc2 listen-to=src_2 ! m.sink_2 \
  interpipesrc stream-sync=restart-ts name=interpipesrc3 listen-to=src_3 ! m.sink_3

The speed of the nvinfer is slower than the fps of the sources so I use the interpipe with stream-sync property. The memory used by GStreamer rises very slowly (from 950MB to ~2Gb in 1 day).

I have tried some properties of both interpipesink and interpipesrc but the problem is still not resolved.

minusplusminus commented 1 year ago

This article explains why: https://www.thegoodpenguin.co.uk/blog/finding-a-memory-leak-in-a-large-and-complex-gstreamer-pipeline/