Memory leakage in nvstreammux + nvmultistreamtiler

Hello,

on tx2 4g deepstream v4.0, I am trying to show picture in picture using the following test command, but we see memory leakage, ( mem rise at about 0.1% using top command) ,could you help to solve it?

gst-launch-1.0 nvstreammux name=nvmux_layout width=1920 height=1080 batch-size=1 batched-push-timeout=50000000 ! nvmultistreamtiler name=nvtile_layout width=1920 height=1080 columns=1 rows=4 show-source=0 ! fakesink sync=false
nvstreammux name=nvmux width=1920 height=1080 batch-size=4 batched-push-timeout=50000000 ! nvmultistreamtiler name=nvtile width=1920 height=1080 columns=1 rows=4 show-source=1 ! nvvideoconvert ! “video/x-raw(memory:NVMM),format=RGBA” ! nvmux_layout.sink_0
videotestsrc pattern=5 ! ‘video/x-raw,format=YUY2,width=1920,height=1080’ ! videorate ! ‘video/x-raw,framerate=50/1’ ! videoconvert ! “video/x-raw,format=NV12” ! nvvideoconvert ! “video/x-raw(memory:NVMM),format=NV12” ! tee name=split0 split0.src_0 ! queue ! nvmux.sink_0
videotestsrc pattern=3 ! ‘video/x-raw,format=YUY2,width=1920,height=1080’ ! videorate ! ‘video/x-raw,framerate=50/1’ ! videoconvert ! “video/x-raw,format=NV12” ! nvvideoconvert ! “video/x-raw(memory:NVMM),format=NV12” ! tee name=split1 split1.src_0 ! queue ! nvmux.sink_1
videotestsrc pattern=6 ! ‘video/x-raw,format=YUY2,width=1920,height=1080’ ! videorate ! ‘video/x-raw,framerate=50/1’ ! videoconvert ! “video/x-raw,format=NV12” ! nvvideoconvert ! “video/x-raw(memory:NVMM),format=NV12” ! tee name=split2 split2.src_0 ! queue ! nvmux.sink_2
videotestsrc pattern=4 ! ‘video/x-raw,format=YUY2,width=1920,height=1080’ ! videorate ! ‘video/x-raw,framerate=50/1’ ! videoconvert ! “video/x-raw,format=NV12” ! nvvideoconvert ! “video/x-raw(memory:NVMM),format=NV12” ! tee name=split3 split3.src_0 ! queue ! nvmux.sink_3

Hi Hoov erLv,

We have some memory leakage issues fixed at newer version, I will suggest you to upgrade your device to JetPack 4.4 GA with DeepStream SDK 5.0 GA version.

I just tried the same test on Deepstream SDK5.0 GA version and the memory leakage remains 0.1% per second.

There are two nvstreammux in the pipeline, why? You can not use nvstreamux in this way. And there are tees in the pipeline which actually with only one src pad, it is a kind of waste.

I’ve tested the following pipeline on my Jetson board. There is no memory leak found.

gst-launch-1.0 videotestsrc pattern=5 ! ‘video/x-raw,format=YUY2,width=1920,height=1080,framerate=30/1’ ! videorate ! ‘video/x-raw,format=YUY2,width=1920,height=1080,framerate=50/1’ ! videoconvert ! ‘video/x-raw,format=NV12,width=1920,height=1080’ ! nvvideoconvert nvbuf-memory-type=0 ! ‘video/x-raw(memory:NVMM),format=NV12,width=1920,height=1080’ ! mux.sink_0 nvstreammux name=mux width=1920 height=1080 batch-size=4 ! nvmultistreamtiler width=1920 height=1080 columns=1 rows=4 show-source=1 ! nvvideoconvert ! ‘video/x-raw(memory:NVMM),format=RGBA’ ! fakesink videotestsrc pattern=3 ! ‘video/x-raw,format=YUY2,width=1920,height=1080,framerate=30/1’ ! videorate ! ‘video/x-raw,format=YUY2,width=1920,height=1080,framerate=50/1’ ! videoconvert ! ‘video/x-raw,format=NV12,width=1920,height=1080’ ! nvvideoconvert nvbuf-memory-type=0 ! ‘video/x-raw(memory:NVMM),format=NV12,width=1920,height=1080’ ! mux.sink_1 videotestsrc pattern=6 ! ‘video/x-raw,format=YUY2,width=1920,height=1080,framerate=30/1’ ! videorate ! ‘video/x-raw,format=YUY2,width=1920,height=1080,framerate=50/1’ ! videoconvert ! ‘video/x-raw,format=NV12,width=1920,height=1080’ ! nvvideoconvert nvbuf-memory-type=0 ! ‘video/x-raw(memory:NVMM),format=NV12,width=1920,height=1080’ ! mux.sink_2 videotestsrc pattern=4 ! ‘video/x-raw,format=YUY2,width=1920,height=1080,framerate=30/1’ ! videorate ! ‘video/x-raw,format=YUY2,width=1920,height=1080,framerate=50/1’ ! videoconvert ! ‘video/x-raw,format=NV12,width=1920,height=1080’ ! nvvideoconvert nvbuf-memory-type=0 ! ‘video/x-raw(memory:NVMM),format=NV12,width=1920,height=1080’ ! mux.sink_3

1 Like