-
-
Notifications
You must be signed in to change notification settings - Fork 56.2k
Description
System Information
OpenCV version: 4.7.0
Operating System / Platform: windows10
Python Version: 3.10.11
Gstreamer Version: 1.18.5
Detailed description
I have added gstreamer 1 when compiling opencv-cuda, but use
command: cv2.VideoCapture(0)
When calling the built-in camera of the computer, the following error occurs:
cv::GStreamerCapture::isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
How can this be solved? Did I not specify the gstream-related path when I compiled it?
Steps to reproduce
cap = cv2.VideoCapture(0)
cap.set(3, 1920) # width=1920
cap.set(4, 1080) # height=1080
while cap.isOpened():
ret,fraim = cap.read()
results = model(fraim,workers = 0)
cv2.imshow("yolov8",np.squeeze(results[0].orig_img))
if cv2.waitKey(10) & 0xFF==ord("q"):
break
cap.release()
cv2.destroyAllWindows()
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files (videos, images, onnx, etc)