opencv error in TX2

i have an issue with TX2 opencv

i want to use the


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 !


How about checking the usage of Videocapture and below external discussion.