OpenCV Error: Unspecified error (GStreamer: unable to start pipeline
) in cvCaptureFromCAM_GStreamer, file __/opencv/modules/videoio/src/cap_gstreamer.cpp, line 881
VIDEOIO(cvCreateCapture_GStreamer (CV_CAP_GSTREAMER_FILE, filename)): raised OpenCV exception:
__/opencv/modules/videoio/src/cap_gstreamer.cpp:881: error: (-2) GStreamer: unable to start pipeline
in function cvCaptureFromCAM_GStreamer
Error opening stream : Error: Video file could not be opened (opencv reqs. non relative paths)
at Error (native)
at startLiveStreaming (/home/nvidia/aggregatorOpenCV/jetson-device-client/aggregatorjetson.js:346:16)
at /home/nvidia/aggregatorOpenCV/jetson-device-client/aggregatorjetson.js:143:21
at /home/nvidia/aggregatorOpenCV/jetson-device-client/aggregatorjetson.js:494:17
at /home/nvidia/aggregatorOpenCV/jetson-device-client/node_modules/mkdirp/index.js:30:20
at FSReqWrap.oncomplete (fs.js:123:15)
There are some more errors regarding gstreamer pipeline.
Can I know the solution?
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://<ip_address>/etc
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
ERROR: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source: Could not open resource for reading.
Additional debug info:
gstrtspsrc.c(5384): gst_rtspsrc_setup_auth (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source:
No supported authentication protocol was found
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://<ip_address>/etc
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not open resource for reading.
Additional debug info:
gstrtspsrc.c(5384): gst_rtspsrc_setup_auth (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
No supported authentication protocol was found
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
The error “No supported authentication protocol was found”. Are you sure your rtsp server is working? Could you use vlc or any client app to do streaming first?
This URL gives that authentication error by using gst-launch-1.0
But this works fine with OpenCV 3.3.0 and gstreamer 1.8.3 on Jetson
What is the difference here between gst-launch-1.0 and gstreamer1.8.3? They are supposed to be the same thing. Do you mean some rtsp plugin from gstreamer 1.8.3?
OpenCV 3.3 works fine under this camera, right?
For second camera, looks like gstreamer can work. Could you try it with gst-launch-1.0 rtspsrc location=“rtsp://<ip_address>/onvif1” name=r latency=0 ! rtph264depay ! h264parse ! decodebin ! nvoverlaysink on Tegra to see if preview is shown?
This thread has successful example, could you take a look?
This URL gives that authentication error by using gst-launch-1.0
But this works fine with OpenCV 3.3.0 and gstreamer 1.8.3 on Jetson
I meant OpenCV3.3.0 which is using gstreamer 1.8.3 internally is giving the issue
While using gst-launch-1.0 command line tool, streaming works fine.
Actually I’m able to stream IP camera. But like 3 out of 10 times it fails giving the gstreamer OpenCV issue mentioned at very first.
Using gst-launch and ffmpeg or ffplay these URLs works fine.
The issue is with OpenCV streaming Videocapture.
OpenCV Error: Unspecified error (GStreamer: unable to start pipeline
) in cvCaptureFromCAM_GStreamer, file __/opencv/modules/videoio/src/cap_gstreamer.cpp, line 881
VIDEOIO(cvCreateCapture_GStreamer (CV_CAP_GSTREAMER_FILE, filename)): raised OpenCV exception:
__/opencv/modules/videoio/src/cap_gstreamer.cpp:881: error: (-2) GStreamer: unable to start pipeline
in function cvCaptureFromCAM_GStreamer
Error opening stream : Error: Video file could not be opened (opencv reqs. non relative paths)
at Error (native)
at startLiveStreaming (/home/nvidia/aggregatorOpenCV/jetson-device-client/aggregatorjetson.js:346:16)
at /home/nvidia/aggregatorOpenCV/jetson-device-client/aggregatorjetson.js:143:21
at /home/nvidia/aggregatorOpenCV/jetson-device-client/aggregatorjetson.js:494:17
at /home/nvidia/aggregatorOpenCV/jetson-device-client/node_modules/mkdirp/index.js:30:20
at FSReqWrap.oncomplete (fs.js:123:15)
Like if it’s works with gst-launch anf ffmpeg consistently, then why it isnt consistent with OpenCV.
And if it gets opened
Also while doing
cap.release()
It sometimes gives following error
(node:6523): GStreamer-CRITICAL **:
Trying to dispose element videoconvert0, but it is in READY instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.
(node:6523): GStreamer-CRITICAL **:
Trying to dispose element pipeline0, but it is in PAUSED instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.
(node:6523): GStreamer-CRITICAL **:
Trying to dispose element videoscale0, but it is in READY instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.
(node:6523): GStreamer-CRITICAL **:
Trying to dispose element pipeline0, but it is in PLAYING instead of the NULL state.
You need to explicitly set elements to the NULL state before
dropping the final reference, to allow them to clean up.
This problem may also be caused by a refcounting bug in the
application or some element.