Why `release_request_pad( )` of nvstreammux element is such slow?

Hey, guys

I built a dynamic pipeline similar to nvidia’s official python app runtime_source_add_delete.

Everything works fine, except when release_request_pad() function called on nvstreammux, which takes me about 40 ~ 160 seconds to release the pad.

Why was that happened and how can I fix it? Could you give me any clue? Thanks forward.

• Hardware Platform (Jetson / GPU) GPU: RTX 3070
• DeepStream Version: 6.0.1

1 did official python app has the same issue in your enviroment?
2 please provide your logs, for example, redirect log to a file , like this: app >1.log, 2>1.log.
3 could you provide your code diff?

Official python app itself works smoothly; I found the reason why my app it is slow.

Cause I occasionally set the property sync-inputs=True, which is different with my sink element’s property sync=False.

If set them both True of both False, them my app works fine.

could you provide your code diff? only sink.set_property(“sync”, 1) ?

Yes, I reproduce the issue on the official app, I’ll post soon.

myapp_deepstream_rt_src_add_del.py (18.6 KB)

I only modify few lines of code:

  • add timing in stop_release_source function
  • add a sink probe to print buffer timestamp to notify that gstreaming is running

Here is the diff result:

And here is result after running the code:


The thing I found is that when sync-inputs on nvstreammux is different from sync on sink, the issue appears.

Why is this happened? Could you give me any clue?

what is your video source? Using your code I can’t reproduce the hung issue, my test video is deepstream’s sample_720p.mp4.

I sent you a message containing my test video. Thank you very much.

I repeatedly reproduce the issue on DeepStream Official Container environment (devel version).

Hi, do you have any progress on this issue?

1 if only adding “streammux.set_property(“sync-inputs”, True)” in python code, I can reproduce this hung issue by your video file, deleting some sources will cost more than 40 seconds.
2 sync-inputs means “Boolean property to sychronization of input frames using PTS”, maybe sychronization will cause to wait, I will check, you can set it to false for workaround.

OK. I set it false by now. Thank you very much about your effort.
If you have any news about it, please let me know. I’m appreciate about that.

have filed an internal bug, will post here if fixed.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

As sync-inputs at streammux is to TRUE, please set sync=TRUE at the sink(i.e. eglsink or fakesink which you are using) and check.
after testing on ds6.1, no stuck issue observed again. here is the log
6.1-nostuck.log (9.1 KB)