Decrease processing speed of pipeline

Please provide complete information as applicable to your setup.

Good day

I am using deepstream along with the python bindings to process streams. All is going well, but the GPU of my computer is consistently crashing when I try to test a certain feature of the program. I suspect it is due to the processing constraints of the GPU-it crashes when the processing requirements exceeds it capabilities.

Is there a way for me to decrease the rate at which images are processed in the pipeline(Like configuring the streammux plugin to release frames at a slower rate)? In believe that this would prevent the GPU from crashing.

There are many similar parameters that can control this scenario.
1.skip-frames in Decode.
2.interval in nvinfer plugin.
3.videorate plugin

Thank you, I think that the “videorate” plugin would work the best. I tried to implement it like this:

queue = make_queue()
pipeline.add(streammuxOG)
pipeline.add(queue)
streammuxOG.link(queue)

videoRate = Gst.ElementFactory.make("videorate", "videorate_Plugin")
videoRate.set_property("max-rate", 10.0)
videoRate.set_property("average-period", 10.0)
pipeline.add(videoRate)
queue.link(videoRate)
queue = make_queue()
pipeline.add(queue)
videoRate.link(queue)

So effectively this section of the pipeline would look like this:

… → streammux → queue → videorate ->queue → …

The videorate plugin does not seem to have an influence. The video is able to be processed, but the frame rate in the processed video is still 60 FPS. I am streaming a video that is stored on my local device.

You need to set the framerate parameter. Please refer to the videorate plugin.

When I try to set the framerate parameter then I get this message:

Traceback (most recent call last):
File “main.py”, line 58, in
sys.exit(main())
File “main.py”, line 28, in main
pipeline, streammux, tiler, nvosd, ALL_BINS = construct_pipeline(sources, ip_addreses, ONNX, fileNames)
File “/home/aizatron/repos/RnD-video-tracking/src/pipeline_setup.py”, line 161, in construct_pipeline
videoRate.set_property(“framerate”, 10/1)
TypeError: object of type GstVideoRate' does not have property framerate’

And here is the relevant section of code:

videoRate = Gst.ElementFactory.make("videorate", "videorate_Plugin")
videoRate.set_property("framerate", 10/1)
pipeline.add(videoRate)
queue.link(videoRate)
queue = make_queue()
pipeline.add(queue)
videoRate.link(queue)

Yes, that is because framerate is not supposed to be written using set_property().
if you run “gst-inspect-1.0 videorate”, you will not find framerate in the element properties

your code respective pipeline on a terminal would look lik this
... ! videorate framerate=10/1 ! ...
but it actually works like this
... ! videorate ! "video/x-raw,framerate=10/1 ! ...

so you can change your code to something like this…

Method 1 : (NOTE: if you have nvstreammux right after the videorate element, you can do the linking of srcpad and sinkpad of this capsfilter and nvstreammux)

creation of element

adding elements to pipeline
videorate2

linking the elements
videorate3

Method 2 :
Write your pipeline in a string
videorate1

Parse it
videorate2

I hope this helps you in some way.

Awesome thank you very much for the thorough response!

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