Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I think your URL is wrong or, considering you are using a GStreamer interface your should use

cap = cv2.VideoCapture(YOUR_URL, cv2.CAP_GSTREAMER)

In addiction your OpenCV binaries must have enabled the GStreamer API, usually isn't, therefore you have to rebuild OpenCV from source and enable the API using CMake.

I think your URL is wrong or, considering you are using a GStreamer interface your should useuse the apiPreference param like below:

cap = cv2.VideoCapture(YOUR_URL, cv2.CAP_GSTREAMER)

In addiction your OpenCV binaries must have enabled the GStreamer API, usually isn't, therefore you have to rebuild OpenCV from source and enable the API using CMake.