Hi all:
I have a problem with cv2.VideoCapture(0).read by Jetson Xavier NX, as described below:
Description:
1.When i use below command “gst-launch-1…” it works well.
please try to set the OPENCV_VIDEOIO_DEBUG=1 environment var,
then rerun your script.
it should print out info about the available video backends on your box.
based on that, play with different backends (e.g. CAP_V4L) and see, if one of them works better.
Hi @crackwitz :
Thanks for your reply,
print out info as bellow:
[ WARN:0] global /home/ability/test1/opencv-4.4.0/modules/videoio/src/cap.cpp (211) open VIDEOIO(GSTREAMER): trying capture cameraNum=0 ...
[ WARN:0] global /home/ability/test1/opencv-4.4.0/modules/videoio/src/cap_gstreamer.cpp (1761) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module v4l2src0 reported: Internal data stream error.
[ WARN:0] global /home/ability/test1/opencv-4.4.0/modules/videoio/src/cap_gstreamer.cpp (888) open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0] global /home/ability/test1/opencv-4.4.0/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
[ WARN:0] global /home/ability/test1/opencv-4.4.0/modules/videoio/src/cap.cpp (235) open VIDEOIO(GSTREAMER): can't create capture
[ WARN:0] global /home/ability/test1/opencv-4.4.0/modules/videoio/src/cap.cpp (211) open VIDEOIO(MSMF): trying capture cameraNum=0 ...
[ WARN:0] global /home/ability/test1/opencv-4.4.0/modules/videoio/src/cap.cpp (274) open VIDEOIO(MSMF): backend is not available (plugin is missing, or can't be loaded due dependencies or it is not compatible)
[ WARN:0] global /home/ability/test1/opencv-4.4.0/modules/videoio/src/cap.cpp (211) open VIDEOIO(V4L2): trying capture cameraNum=0 ...
[ WARN:0] global /home/ability/test1/opencv-4.4.0/modules/videoio/src/cap.cpp (224) open VIDEOIO(V4L2): created, isOpened=1
[ WARN:0] global /home/ability/test1/opencv-4.4.0/modules/videoio/src/cap_v4l.cpp (1004) tryIoctl VIDEOIO(V4L2:/dev/video0): select() timeout.