Output rtsp How to set the video framerate

**• Hardware Platform: Jetson
**• DeepStream Version:6.0.1
**• JetPack Version (valid for Jetson only): 4.6.4
**• TensorRT Version:8.2

My plumbing process:
nvstreammux → nvinfer → nvvideoconvert → nvmultistreamtiler → tee → queue1 → nvdsosd → nvvideoconvert → capsfilter → nvv4l2h264enc → rtph264pay → udpsink
→ queue2 → nvvideoconvert → capsfilter → avenc_mpeg4 → mpeg4videoparse → splitmuxsink

rtspCaps = Gst.ElementFactory.make(“capsfilter”, “rtspFilter”)
rtspCaps.set_property(“caps”, Gst.Caps.from_string(“video/x-raw(memory:NVMM), framerate=15/1, width=960, height=540, format=I420”))

The output rtsp parameter framerate=15/1 is set in capsfilter, but the framerate in the output rtsp video stream is still 30. How can I set the output rtsp framerate to 15???

Hi @tang_gouwu

The framerate of an encoded buffer has nothing to do with the framerate of its content. You need to change the framerate before encoding. My suggestion is to do this before nvstreammux because processing inference on frames that will be dropped wastes resources. Also, I’m not sure if nvvideoconvert can convert framerates; you should consider using videorate for that:

gst-launch-1.0 \
videotestsrc is-live=true ! \
"video/x-raw,framerate=30/1" ! \
videorate drop-only=true max-rate=15 ! \
fakesink

The fakesink will get 15fps.

@miguel.taylor The video source in nvstreammux has been set to 15fps input, but the udpRtsp output is still 30fps

how did you do this setting? is the source’s fps 30? you can measure the fps in nvstreammux’s src probe function.

It was set up on the ipc webcam.

@fanzh @miguel.taylor Now my question is the ipc camera input is 15fps, but the output rtsp is 30fps frame rate, tried a variety of methods are not good, how to do can output 15fps rtsp video stream

  1. how do you know output rtsp 's fps is 30fps? did you measure the actual fps? maybe the mediainfo 's fps is 30 while the actual fps is 15.
  2. To narrow down this issue, you can add log in probe function to measure the fps. then you can get which element will change fps 15 to 30.

@fanzh I used the vlc player to play the deepstream output rtsp stream and check the corresponding information to get the output fps frame rate of 30

could you use this command to test the actual fps? please share the “current” and “average” data after running for a while.
gst-launch-1.0 uridecodebin uri=xxx ! nvvideoconvert ! fpsdisplaysink

@tang_gouwu

We have an element that measures FPS at any point in the pipeline. Would you mind installing it and adding it after each element in your pipeline to check where this framerate is coming from?

@fanzh I tried, but I got a mistake. What’s the reason

About this new error, you can open a new topic. currently our target is to check the actual output fps and which element will change fps 15. could you use the following simple code to check?
get-fps.txt (939 Bytes)

thanks you! The initial positioning should be a dynamic source related code problem.

1 Like

Thanks for the update, Is this still an DeepStream issue to support? Thanks!

Thanks! That question won’t be needed, but I have other rtsp questions, so I’ll make another topic

OK, please open a new topic.

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