Hi i am attempting to use gstreamer to build a pipeline so I can save images to an external drive. I am having issues opening the file with cv2.VideoCapture.
if cap0.isOpened() is not True:
print(gstreamer_0)
print(“Cannot open camera”)
quit()
the gst-launch-1.0 works in terminal when ! appsink is replaced by !autovideosink. however when in python I recieve no errors, and the video capture simply does not open.
Thanks in advance
Hi,
I used the following line from the samples you gave me cap = cv2.VideoCapture("nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080,format=(string)NV12, framerate=(fraction)30/1 ! nvvidconv ! video/x-raw, format=(string)I420 ! appsink") However I still could not open the capture video.
I also attempted
gstreamer_0 = ('gst-launch-1.0 ’
'nvarguscamerasrc ’
'sensor-id=0 ’
"! ‘video/x-raw(memory:NVMM), "
"width=4056, height=3040, "
"framerate=15/1’ "
“! nvvidconv flip-method=0 "
“! ‘video/x-raw(memory:NVMM), "
"format=BGR’”
" ! appsink”)
I also attempted ! videoconvert before and after I format to BGR.
Thanks
Hi,
I have investigated the issue further and found using cv2.getBuildInformation that for ‘video I/O’ GStreamer is set to NO.
Is the only way to resolved this to reflash CV2 onto the system using the SDK manager?
Hi,
We have included OpenCV 4.1.1 package which enables gstreamer in SDK components. Yo may re-flash system image and install SDK components through SDKManager.