opencv error in TX2

i have an issue with TX2 opencv

i want to use the

cv2.VideoCapture()

but when i run the code, i got opencv error message

the message looks like this

VIDEOIO ERROR: V4L: index 1 is not correct!
OpenCV Error: Unspecified error (GStreamer: unable to start pipeline
) in cvCaptureFromCAM_GStreamer, file /home/cognixy/src/opencv-3.4.0/modules/videoio/src/cap_gstreamer.cpp, line 890
VIDEOIO(cvCreateCapture_GStreamer(CV_CAP_GSTREAMER_V4L2, reinterpret_cast<char *>(index))): raised OpenCV exception:

/home/cognixy/src/opencv-3.4.0/modules/videoio/src/cap_gstreamer.cpp:890: error: (-2) GStreamer: unable to start pipeline
 in function cvCaptureFromCAM_GStreamer

does anyone have the same trouble with me? any answer would be appreciated, thanks !

Hi,

How about checking the usage of Videocapture and below external discussion.
https://docs.opencv.org/3.4/d8/dfe/classcv_1_1VideoCapture.html
https://stackoverflow.com/questions/21792909/cv2-videocapture-open-always-returns-false