Udpsink drops 30 packets

Hi, I am trying to stream video from nvidia to windows using gstreamer udpsrc. My pipeline on nvidia side as follows

        sprintf(p_hnd->pipelineStr,
        "appsrc name=%s ! video/x-raw,format=GRAY16_LE,width=%u,height=%u ! videocrop right=%u ! videoconvert ! video/x-raw,format=(string)I420 ! omxh265enc control-rate=2 bitrate=800000 ! video/x-h265, stream-format=(string)byte-stream ! h265parse ! rtph265pay ! udpsink host=%s port=%u sync=false async=false",
        appSrcNameArray[streamCam], finalWidth, finalHeight, cropwidth, p_hnd->streamConfig.streamIP,p_hnd->streamConfig.streamPort);

and pipeline on the windows side as follows

			_pipeline = fmt::format("udpsrc port={} ! queue ! application/x-rtp,framerate=1/1,encoding-name=H265,payload=96 ! \
									 rtph265depay ! queue ! h265parse ! avdec_h265 ! \
									 videoconvert ! video/x-raw,format=(string)GRAY8 ! decodebin ! \
									 videoconvert ! appsink name={} emit-signals=true sync=false drop=true", mStreamPort, _sinkName);

My issue is first 30 frames are not given by udpsink. I verified on the wireshark, windows is receiving first 30 frames. What might be the problem?. How to resolve this?.

Hi,
We have derecated omx plugins. Please use nvv4l2h265enc plugin. This post has sample commands:
Gstreamer TCPserversink 2-3 seconds latency - #5 by DaneLLL

Deocoding begins from first IDR frame, so the h265 streams are dropped before receiving first IDR frame. If you don’t want to drop too many packets, please set idrinterval to small value.

Hi DaneLLL, Thanks for the reply. I changed the pipeline to
sprintf(p_hnd->pipelineStr, "appsrc name=%s ! video/x-raw,format=GRAY16_LE,width=%u,height=%u ! videocrop right=%u ! videoconvert ! nvvidconv ! video/x-raw(memory:NVMM),width=%u,height=%u ! nvv4l2h265enc control-rate=2 bitrate=800000 insert-sps-pps=1 idrinterval=15 ! video/x-h265, stream-format=(string)byte-stream ! h265parse ! rtph265pay ! udpsink host=%s port=%u sync=false async=false", appSrcNameArray[streamCam], finalWidth, finalHeight, cropwidth, finalWidth - cropwidth, finalHeight, p_hnd->streamConfig.streamIP,p_hnd->streamConfig.streamPort);

But after this, I receive only 60 frames. After 60 frames, streaming stops. I verified from the NX side that I am pushing the buffer to gstreamer pipeline. What might be the reason?

I tried removing idrinterval andinsert-sps-pps, I still received only 60 frames. Seems like the behavior of nvv4l2h265enc . Did I miss anything in the pipeline?

For nvv4l2h265enc, set control-rate=1 for constant bitrate. See:

gst-inspect-1.0 nvv4l2h265enc

Hi,
As comparison, please also try gst-launch-1.0 commands in
Gstreamer TCPserversink 2-3 seconds latency - #5 by DaneLLL

See if you can achieve the same performance. And then can use videotestsrc to simulate your source like:

$ gst-launch-1.0 videotestsrc is-live=1 ! video/x-raw,format=GRAY16_LE,width=finalWidth,height=finalHeight ! ... 

Thanks for the help. It was a stupid mistake. I was limiting only 60 frames.