Hi. I’m trying to send stream to my application using opencv in the next way:
Send from console:
gst-launch-1.0 -v nvcamerasrc fpsRange='30.0 30.0' ! "video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)I420, framerate=(fraction)30/1" ! nvvidconv ! "video/x-raw, width=(int)1280, height=(int)720, format=(string)I420, framerate=(fraction)30/1" ! jpegenc ! rtpjpegpay ! udpsink host=127.0.0.1 port=5000
Receive in my app using opencv:
VideoCapture cap("udpsrc port=5000 ! application/x-rtp,media=video,payload=26, encoding-name=JPEG,framerate=30/1 ! rtpjpegdepay ! jpegdec ! video/x-raw, format=(string)BGR ! appsink"
, cv::CAP_GSTREAMER);
But it gives me next errors on receiver side:
0:00:00.123412181 23829 0x7c9b70 WARN GST_PADS gstpad.c:4092:gst_pad_peer_query:<jpegdec0:src> could not send sticky events
0:00:00.130739356 23829 0x7c9b70 WARN basesrc gstbasesrc.c:2948:gst_base_src_loop:<udpsrc0> error: Internal data flow error.
0:00:00.130769532 23829 0x7c9b70 WARN basesrc gstbasesrc.c:2948:gst_base_src_loop:<udpsrc0> error: streaming task paused, reason not-negotiated (-4)
(opencv_test_2:23829): GStreamer-CRITICAL **: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed