Ask Your Question

Revision history [back]

Error: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed

While run the below program:

vc = cv2.VideoCapture('udpsrc port=5600 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! decodebin ! videoconvert ! appsink', cv2.CAP_GSTREAMER)

I am getting this error:

GStreamer: Error opening bin: no element "udpsrc"

(python.exe:652): GStreamer-CRITICAL **: 12:39:30.967: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed

I have already installed opencv with gstreamer support in python2. Here is cv2.getBuildInformation() snapshot:

> Video I/O:
>     DC1394:                      NO
>     FFMPEG:                      NO
>       avcodec:                   NO
>       avformat:                  NO
>       avutil:                    NO
>       swscale:                   NO
>       avresample:                NO
>     GStreamer:
>       base:                      YES (ver 1.0)
>       video:                     YES (ver 1.0)
>       app:                       YES (ver 1.0)
>       riff:                      YES (ver 1.0)
>       pbutils:                   YES (ver 1.0)
>     DirectShow:                  YES
>     Media Foundation:            YES
>       DXVA:                      YES

Please help me to resolve this issue.

Error: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed

While run the below program:

vc = cv2.VideoCapture('udpsrc port=5600 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! decodebin ! videoconvert ! appsink', cv2.CAP_GSTREAMER)

I am getting this error:

GStreamer: Error opening bin: no element "udpsrc"

(python.exe:652): GStreamer-CRITICAL **: 12:39:30.967: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed

I have already installed opencv with gstreamer support in python2. Here is cv2.getBuildInformation() snapshot:

> Video I/O:
>     DC1394:                      NO
>     FFMPEG:                      NO
>     YES (prebuilt binaries)
  avcodec:                   NO
>     YES (ver 57.107.100)
  avformat:                  NO
>     YES (ver 57.83.100)
  avutil:                    NO
>     YES (ver 55.78.100)
  swscale:                   NO
>     YES (ver 4.8.100)
  avresample:                NO
>     GStreamer:
>     YES (ver 3.7.0)
GStreamer:                   
  base:                      YES (ver 1.0)
>       video:                     YES (ver 1.0)
>       app:                       YES (ver 1.0)
>       riff:                      YES (ver 1.0)
>       pbutils:                   YES (ver 1.0)
>     DirectShow:                  YES
>     Media Foundation:            YES
>       DXVA:                      YES

Please help me to resolve this issue.