How to control RTSP videorate

Please provide complete information as applicable to your setup.

• Hardware Platform GPU)
**• DeepStream Version 6.0
• TensorRT Version 8
• NVIDIA GPU Driver Version (valid for GPU only) 470
• Issue Type questions

Hi there,
I’m trying to control the videorate of multi RTSP input before they are feed into streammux, so to reduce consumption of GPU.
I’ve tried use the videorate plugin, but confusedly, the videorate doesn’t change at all.

I don’t know where I do wrong. Please give me some hints.


for i in range(number_sources):
        print("Creating source_bin ",i," \n ")
        if uri_name.find("rtsp://") == 0 :
            is_live = True
        source_bin=create_source_bin(i, uri_name)
        if not source_bin:
            sys.stderr.write("Unable to create source bin \n")

        video_convertor_name = "nvvidconv_%u"%i
        print("Creating nvvidconv ",i ," \n ")
        # Create nvvidcon.
        video_convertor_name = Gst.ElementFactory.make("nvvideoconvert", video_convertor_name)
        if not video_convertor_name:
            sys.stderr.write(" Unable to create nvvidconv",i," \n")
        # video_convertor_name.set_property("average-period", 40)

        videorate_name = "videorate_%u"%i
        print("Creating videorate ",i ," \n ")
        # Create videorate.
        videorate_name = Gst.ElementFactory.make("videorate", videorate_name)
        if not videorate_name:
            sys.stderr.write(" Unable to create videorate \n")
        videorate_name.set_property("drop-only", 1)
        padname="sink_%u" %i
        sinkpad= streammux.get_request_pad(padname) 
        if not sinkpad:
            sys.stderr.write("Unable to create sink pad bin \n")
        if not srcpad:
            sys.stderr.write("Unable to create src pad bin \n")

Please refer to videorate ( for the usage of videorate.

thx for quick reply.

As I said, I’ve tried videorate and it seems not work at all. I’ve also modify my code in reference to this. Unfortunately, it doesn’t work either.

I’m considering maybe the problem is the output format of source_bin(i.e. uri decoder) can not be compatible with videorate plugin as video plugin requires





Okey, I found the issue is that I’m using fakesink.

If I change to egl sink, the video rate dose work. But, why it doesn’t work with fakesink?
And as my goal is using this app backstage, I don’t need eglsink.

Is there a way to achieve this?

thx a lot

I figured this out that fakesink doesn’t support videorate control. Once use fakesink as sink, pipeline feed data into it as quickly as possible.
Use fakevideosink to solve this problem.

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