Error opening bin: no element "nvv4l2decoder"

Hi there

I am having the following error

[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (711) open OpenCV | GStreamer warning: Error opening bin: no element "nvv4l2decoder"
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
Traceback (most recent call last):
  File "wfcamera.py", line 13, in <module>
    cv2.imshow('nanoCam',frame)
cv2.error: OpenCV(4.1.1) /home/nvidia/host/build_opencv/nv_opencv/modules/highgui/src/window.cpp:352: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'imshow'

From this code


import cv2
print(cv2.__version__)
width=1296
height=730
flip=2

camSet=' tcpclientsrc host= port= ! gdpdepay ! rtph264depay ! nvv4l2decoder  ! nvvidconv flip-method='+str(flip)+' ! video/x-raw,format=BGRx ! videoconvert ! video/x-raw, width='+str(width)+', height='+str(height)+',format=BGR ! appsink  drop=true sync=false '
cam= cv2.VideoCapture(camSet)
#cam = cv2.VideoCapture(0)
while True:
    ret, frame = cam.read()
    cv2.imshow('nanoCam',frame)
    cv2.moveWindow('nanoCam',0,0)
    if cv2.waitKey(1)==ord('q'):
        break
cam.release()
cv2.destroyAllWindows()

Hi,
Please clean the cache and check if you can see the plugin nvv4l2decoder:

nvidia@tegra-ubuntu:~$ rm .cache/gstreamer-1.0/registry.aarch64.bin
nvidia@tegra-ubuntu:~$ gst-inspect-1.0 nvv4l2decoder

Doesn’t work, I don’t know how but it says cv2 is not installed anymore

Hi,
We suggest re-install the system image. Better to have sdcard >= 32GB

I got a +256GB sd card. I m reinstalling OpenCV because it seems that the problem is related to it. In case I will do the hard reset. Does anybody have the same problem/solution?

Still error, after re-flash and reinstall OpenCV

[ WARN:0] global /home/lip/workspace/opencv-4.5.0/modules/videoio/src/cap_gstreamer.cpp (713) open OpenCV | GStreamer warning: Error opening bin: could not link nvv4l2decoder0 to h264parse0
[ WARN:0] global /home/lip/workspace/opencv-4.5.0/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
Traceback (most recent call last):
  File "wfc.py", line 12, in <module>
    cv2.imshow('nanoCam',frame)
cv2.error: OpenCV(4.5.0) /home/lip/workspace/opencv-4.5.0/modules/highgui/src/window.cpp:376: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'imshow'

Hi,
Please check if you can run this sample:
Doesn't work nvv4l2decoder for decoding RTSP in gstreamer + opencv - #3 by DaneLLL

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.