GStreamer warning: Cannot query video position:

I know there are many forum threads about this, but they’re all asking “what pipeline did you put in for GStreamer via cv2.VideoCapture()”? That doesn’t seem to be the relative question in my case…

Here is the most basic code to keep it simple. doesn’t matter what camera I use. still get the same error.

import cv2

cam=cv2.VideoCapture(1) # logitec cams run 448X800 dispWXdispH

while True:

if cv2.waitKey(1)==ord('q'):


The full error is…

[ 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

anybody got any ideas??

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

What difference does that make? I get the error regardless of camera, Doesnt matter if I use my onboard IMX219-160, or if I’m using one of my Logitech pro stream C922x, If I use my jetson nano 4gb, jetpack 4.5 with code oss 1.32.3 with python3.9 interpreter and opencv 4.1, or my windows10 laptop with visual studio code, python 3.9 interpreter and opencv 4.5… the error is the same. So it’s gotta be deeper issue.

This has nothing to do with deepstream. This is opencv problem. opencv/cap_gstreamer.cpp at master · opencv/opencv · GitHub