[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (933) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1

出现类似的warning基本都是一个问题

VideoCapture加个参数就好了

cap = VideoCapture(0, cv.CAP_V4L2)