High framerate on converting mp4 video to rtsp stream

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) Jetson
• DeepStream Version 6.2
• JetPack Version (valid for Jetson only) 5.1.1
• Issue Type( questions, new requirements, bugs) Question

Hello, I have an application which is capable of taking multiple video files (.mp4) and create separate rtsp streams for each. The source element uses the nvurisrcbin with file-loop = True. There is no inference and tracking to be performed in this case.

I am observing that on providing a 15 second video captured at 1280x720p at 30fps as input, the actual FPS of the pipeline is around ~300fps and the RTSP stream looks like the video is playing on fast forward. I have tried other videos and still see a similar behavior. My expectation for this pipeline is to have stream(s) at the same resolution and framerate as the input file.

I have read multiple issues related to this

  1. Fast playback of the video - #4 by Honey_Patouceul
  2. Framerate for mp4 sources
  3. Video output is running at an accelerated frame rate

Have already set the nvstreammux batch-size to be the number of streams but it does not help and also tried setting sync=False/True on the udpsink.

Attaching the structure of the pipeline I am experimenting with below:

The udpsink “sync=1” does work. It will sync with timestamp. The RTSP server can control the RTSP stream by itself. The UDP sender is the faster the better.

gst-launch-1.0 uridecodebin uri=file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4 ! mux.sink_0 nvstreammux name=mux batch-size=1 width=1920 height=1080 ! nvstreamdemux name=demux demux.src_0 ! queue ! nvv4l2h264enc ! h264parse ! udpsink sync=1

Why do you care about the udp sender speed. It will not impact the receiver.

How about the RTSP client side? Is the timestamp inside the RTSP stream correct?

Hi @Fiona.Chen, I noticed a bug in my code which led to this issue. It was not setting the udpsink sync parameter correctly. udpsink sync=1 is the solution. Thanks!

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