rtsp stream receive and decode

kishan kishan.patel at jenextech.com
Fri Aug 10 14:07:12 UTC 2018


Hello,
      When i play rtsp stream video using command line, its working fine.But
with VideoCapture function of opencv, it could not. Please check the below
command:

---------------------
gst-launch-1.0 -v rtspsrc location="rtsp://admin:admin@192.168.1.2:554"
latency=10 ! rtph264depay ! h264parse ! ducatih264dec ! videoconvert !
waylandsink
---------------------(WORKING FINE)

----------------------
cv::VideoCapture cap("rtspsrc
location=\"rtsp://admin:admin@192.168.1.2:554\" latency=10 ! rtph264depay !
h264parse ! ducatih264dec ! videoconvert ! appsink ");
----------------------(Not Working).

Error log as below:
-------------------

(play_rtsp_stream:5304): GStreamer-CRITICAL **: gst_element_get_static_pad:
assertion 'GST_IS_ELEMENT (element)' failed

(play_rtsp_stream:5304): GStreamer-CRITICAL **: gst_pad_get_current_caps:
assertion 'GST_IS_PAD (pad)' failed

(play_rtsp_stream:5304): GStreamer-CRITICAL **: gst_caps_get_structure:
assertion 'GST_IS_CAPS (caps)' failed

(play_rtsp_stream:5304): GStreamer-CRITICAL **: gst_structure_get_int:
assertion 'structure != NULL' failed

(play_rtsp_stream:5304): GStreamer-CRITICAL **: gst_structure_get_int:
assertion 'structure != NULL' failed

(play_rtsp_stream:5304): GStreamer-CRITICAL **: gst_structure_get_fraction:
assertion 'structure != NULL' failed
GStreamer Plugin: Embedded video playback halted; module udpsrc8 reported:
Internal data stream error.
OpenCV Error: Unspecified error (GStreamer: unable to start pipeline
) in icvStartPipeline, file
/oe/bld/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/am57xx_evm-linux-gnueabi/opencv/3.1+gitAUTOINC+9b88e8c746-r3/git/modules/videoio/src/cap_gstreamer.cpp,
line 393
terminate called after throwing an instance of 'cv::Exception'
  what(): 
/oe/bld/build-CORTEX_1/arago-tmp-external-linaro-toolchain/work/am57xx_evm-linux-gnueabi/opencv/3.1+gitAUTOINC+9b88e8c746-r3/git/modules/videoio/src/cap_gstreamer.cpp:393:
error: (-2) GStreamer: unable to start pipeline
 in function icvStartPipeline

Aborted (core dumped)



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list