Is it possible to dump raw video frames to udpsink?

Hi ,
I tried to stream raw data from camera via udp using the following gstreamer pipeline.
gst-launch-1.0 -e nvarguscamerasrc ! ‘video/x-raw(memory:NVMM), width=1920, height=1080, framerate=30/1’ ! udpsink host=127.0.0.1 port=5000 sync=false async=false

From udpsrc I tried to dump data video to appsink and used videocapture api of opencv using the pipeline as given below

udpsrc port=5000 ! nvvidconv ! video/x-raw, width=(int)1920, height=(int)1080, format=(string)NV12 ! nvvidconv ! video/x-raw, width=1920, height=1080, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink

But i am getting the following error

‘pipeline0’ state changed from NULL to READY.
‘pipeline0’ state changed from READY to PAUSED.
‘pipeline0’ state changed from PAUSED to PLAYING.
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected…
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3864 x 2192 FR = 31.000000 fps Duration = 32258064 ; Analog Gain range min 0.000000, max 72.000000; Exposure Range min 111000, max 44663000;

GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 0
Output Stream W = 3864 H = 2192
seconds to Run = 0
Frame Rate = 31.000000
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (1757) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module udpsrc0 reported: Internal data stream error.
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (886) open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created

Kindly share your points to resolve this issue

Thanks in advance

Hi,
Please refer to the topic thread:

And give it a try. However, we would suggest encode the frames if you see bandwidth issue.

I agree with @DaneLLL’s suggestion to rather use an encoded format, but this may work:

Sender:

gst-launch-1.0 -v nvarguscamerasrc ! nvvidconv ! video/x-raw, width=1920, height=1080, framerate=30/1, format=I420 ! rtpvrawpay ! 'application/x-rtp, media=(string)video, encoding-name=(string)RAW' ! udpsink host=127.0.0.1 port=5000

Receiver:

 gst-launch-1.0 -v udpsrc port=5000 ! 'application/x-rtp, media=(string)video, encoding-name=(string)RAW, sampling=(string)YCbCr-4:2:0, depth=(string)8, width=(string)1920, height=(string)1080, framerate=30/1' ! queue ! rtpvrawdepay ! video/x-raw, format=I420 ! xvimagesink