Problem in streaming with RTSP server and Gstreamer

Hello, I am facing issue in streaming video through Xavier Nx. I have installed rtsp server and connected the USB camera to the board and trying to get the stream through VLC player in the laptop connected in the same network.
My source video format is YUYV with size of 640x480.
When I am streaming with ./test-launch, I can able to get the video stream in VLC, but the video streaming ends in 30-40 seconds.
I am using the below pipeline:
./test-launch “v4l2src device=/dev/video0 ! nvvidconv ! nvv4l2h264enc bitrate=12000000 ! h264parse ! rtph264pay name=pay0 pt=96”
it is showing opening in blocking mode. BlockType=4
Need to set EMC Bandwidth = 58800

And I am receiving the video in vlc through rtsp://[xavier IP address]:8554/test
Video starts and then closes in 30-40 sec. Please help where i am getting wrong.

I have also test my pipeline with ./test-launch --gst-debug-label 1 " same as above" and working without error.

Hi,
Please try the command and see if the issue is present:

$ gst-launch-1.0 v4l2src device=/dev/video0 ! nvvidconv ! nvv4l2h264enc bitrate=12000000 ! h264parse ! rtph264pay name=pay0 pt=96 ! fakesink

And please use latest Jetpack 4.6.4 or 5.1.3.

The Jetpack Version: 5.1.2-b104

When I am running this pipeline, It is showing:
Opening in blocking mode
Pipeline is live and does not need PREROLL…
Setting pipeline to PLAYING…
NvMMLiteOpen : Block : BlockType = 4
H264: Profile = 66, Level=0
NVMEDIA: Need to set EMC Bandwidth : 58800

I am not seeing any video or how should I receive the video?

Is this still an issue to support? Any result can be shared?

Yes I have started receiving the video in VLC through the below pipeline.
./test-launch ‘v4l2src device=/dev/video0 io-mode=2 ! nvvidconv ! nvv4l2h264enc ! h264parse ! queue ! rtph264pay name=pay0’
But we are facing the video latency issue. We are receiving the video after 1-2 secs. How can we reduce the video latency issue.
The input video format in our case is ‘YUY2’.

Hi,
There’s buffering mechanism in RTSP but we are uncertain how to adjust it in VLC player. In gstreamer, you can set the property to rtspsrc:
https://gstreamer.freedesktop.org/documentation/rtsp/rtspsrc.html#rtspsrc:latency

By default it is 2000ms.