tiscamera: GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
Fails to load/open a video stream from cv2.VideoCapture format 1280* 960 using DFK 42BCU03 on an appsink. A video of resolution 640 * 480 loads, but the same error is generated.
[ WARN:0] global /home/pi/opencv/modules/videoio/src/cap_gstreamer.cpp (933) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
I checked that the camera supports these video formatting.
Available gstreamer-1.0 caps: video/x-raw,format=GRAY8,width=1280,height=960,framerate={30/1,25/1,15/1,10/1}; video/x-raw,format=GRAY8,width=640,height=480,framerate={60/1,30/1,25/1,15/1}; video/x-raw,format=GRAY8,width=320,height=240,framerate={60/1,30/1,25/1,15/1}; video/x-bayer,format=grbg,width=1280,height=960,framerate={30/1,25/1,15/1,10/1}; video/x-bayer,format=grbg,width=640,height=480,framerate={60/1,30/1,25/1,15/1}; video/x-bayer,format=grbg,width=320,height=240,framerate={60/1,30/1,25/1,15/1}
I checked this error on gst_element_query_position (line 935) of Gstreamer.cpp , and could not understand much.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 15 (7 by maintainers)
The warning is an OpenCV issue and not caused by our modules. Please follow the link [opencv/opencv#10324] (opencv/opencv#10324).
A live source like a camera does not have a video position at all.
Hello, I have the same error and I am using Qt where should I add this code you suggested?
const char *pipeline = " tcambin serial=15810833 ! video/x-raw, format=BGRx, width=1280,height=960, framerate=25/1 ! videoconvert ! appsink"; cv::VideoCapture *cap = new cv::VideoCapture(pipeline, cv2.CAP_GSTREAMER);or this one"tcambin serial=50910677 ! video/x-raw, format=BGRx,width= 1280,height=960, framerate=20/1 ! videoconvert ! videoscale ! appsink", cv2.CAP_GSTREAMER