@Alex-Kushleyev
I think the client side is freezing, and I noticed that VideoCapture takes some time to complete, but ultimately hangs on cap.read(). Below is the relevant debug information:
created output pipe rtsp-debug, channel 0, flags 0
gst-launch-1.0 rtspsrc location=rtsp://169.254.4.201:554/live0 latency=0 ! queue ! rtph264depay ! h264parse config-interval=-1 ! qtivdec ! qtivtransform ! video/x-raw,format=BGR,width=1280,height=720 ! autovideoconvert ! appsink
0:00:00.000749593 14685 0x55c069b780 WARN GST_REGISTRY gstregistrybinary.c:489:gst_registry_binary_check_magic: Binary registry magic version is different : 1.3.0 != 1.12.0
0:00:00.057125316 14685 0x55c069b780 ERROR GST_PIPELINE grammar.y:876:priv_gst_parse_yyparse: unexpected reference "gst-launch-1" - ignoring
0:00:00.057160626 14685 0x55c069b780 ERROR GST_PIPELINE grammar.y:882:priv_gst_parse_yyparse: unexpected pad-reference "0" - ignoring
0:00:00.057168959 14685 0x55c069b780 WARN GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory "rtspsrc"!
0:00:00.057173647 14685 0x55c069b780 ERROR GST_PIPELINE grammar.y:816:priv_gst_parse_yyparse: no element "rtspsrc"
0:00:00.057890325 14685 0x55c069b780 ERROR GST_PIPELINE grammar.y:901:priv_gst_parse_yyparse: link has no source [sink=@0x55c070f730]
0:00:00.057908970 14685 0x55c069b780 WARN GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory "rtph264depay"!
0:00:00.057914021 14685 0x55c069b780 ERROR GST_PIPELINE grammar.y:816:priv_gst_parse_yyparse: no element "rtph264depay"
0:00:00.057918969 14685 0x55c069b780 ERROR GST_PIPELINE grammar.y:901:priv_gst_parse_yyparse: link has no sink [source=@0x55c070f730]
0:00:00.057923292 14685 0x55c069b780 WARN GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory "h264parse"!
0:00:00.057927354 14685 0x55c069b780 ERROR GST_PIPELINE grammar.y:816:priv_gst_parse_yyparse: no element "h264parse"
0:00:00.057932250 14685 0x55c069b780 ERROR GST_PIPELINE grammar.y:901:priv_gst_parse_yyparse: link has no source [sink=@(nil)]
0:00:00.057936260 14685 0x55c069b780 WARN GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory "qtivdec"!
0:00:00.057939437 14685 0x55c069b780 ERROR GST_PIPELINE grammar.y:816:priv_gst_parse_yyparse: no element "qtivdec"
0:00:00.057944072 14685 0x55c069b780 ERROR GST_PIPELINE grammar.y:901:priv_gst_parse_yyparse: link has no source [sink=@(nil)]
0:00:00.057947874 14685 0x55c069b780 WARN GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory "qtivtransform"!
0:00:00.057951467 14685 0x55c069b780 ERROR GST_PIPELINE grammar.y:816:priv_gst_parse_yyparse: no element "qtivtransform"
0:00:00.057956884 14685 0x55c069b780 ERROR GST_PIPELINE grammar.y:901:priv_gst_parse_yyparse: link has no source [sink=@(nil)]
0:00:00.057971726 14685 0x55c069b780 WARN GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory "autovideoconvert"!
0:00:00.057979851 14685 0x55c069b780 ERROR GST_PIPELINE grammar.y:816:priv_gst_parse_yyparse: no element "autovideoconvert"
0:00:00.057985215 14685 0x55c069b780 ERROR GST_PIPELINE grammar.y:901:priv_gst_parse_yyparse: link has no source [sink=@(nil)]
0:00:00.058182496 14685 0x55c069b780 ERROR GST_PIPELINE grammar.y:901:priv_gst_parse_yyparse: link has no source [sink=@0x55c06f51b0]
(python:14685): GStreamer-CRITICAL **: 08:49:15.037: gst_caps_get_structure: assertion 'GST_IS_CAPS (caps)' failed
(python:14685): GStreamer-CRITICAL **: 08:49:15.038: gst_structure_get_int: assertion 'structure != NULL' failed
[ WARN:0@30.090] global cap_gstreamer.cpp:1714 open OpenCV | GStreamer warning: cannot query video width/height
(python:14685): GStreamer-CRITICAL **: 08:49:15.038: gst_structure_get_fraction: assertion 'structure != NULL' failed
[ WARN:0@30.090] global cap_gstreamer.cpp:1722 open OpenCV | GStreamer warning: cannot query video fps
[ WARN:0@30.090] global cap_gstreamer.cpp:1777 open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
(python:14685): GStreamer-CRITICAL **: 08:50:20.041: gst_sample_get_caps: assertion 'GST_IS_SAMPLE (sample)' failed
[ERROR:0@95.092] global cap_gstreamer.cpp:934 retrieveVideoFrame GStreamer: gst_sample_get_caps() returns NULL
(python:14685): GStreamer-CRITICAL **: 08:51:25.042: gst_sample_get_caps: assertion 'GST_IS_SAMPLE (sample)' failed
[ERROR:0@160.094] global cap_gstreamer.cpp:934 retrieveVideoFrame GStreamer: gst_sample_get_caps() returns NULL
^C
(python:14685): GStreamer-CRITICAL **: 08:52:30.044: gst_sample_get_caps: assertion 'GST_IS_SAMPLE (sample)' failed
[ERROR:0@225.096] global cap_gstreamer.cpp:934 retrieveVideoFrame GStreamer: gst_sample_get_caps() returns NULL
Traceback (most recent call last):
File "/voxl-mpa-tools/tools/python/rtsp_rx_mpa_pub.py", line 62, in <module>
ret, frame = vcap.read()
KeyboardInterrupt
Today, I referenced the official website and tested the situation of OpenCV, gstreamer, and MPA with other example commands. The result is that the image produced by gst-launch-1.0 videotestsrc ! videoconvert ! autovideosink can ultimately be seen on the portal. So, I don't think it's an issue with gstreamer installation?
My RTSP source is from an external camera (edge computing device) acting as a server, connected to VOXL via Ethernet for transmission. Currently, I am not using VOXL's built-in camera or UVC camera, and I am not generating an RTSP stream through VOXL's services.