Okay I understood, infact I was posting the pipeline output, which is:
nvarguscamerasrc sensor-id=0 video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, wbmode=0, awblock=true, gainrange="8 8", ispdigitalgainrange="4 4", exposuretimerange="5000000 5000000", aeLock=true, format=(string)NV12, framerate=(fraction)30/1 ! nvvidconv flip-method=0 ! video/x-raw, width=(int)1280, height=(int)720, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink
This time I got this error:
(python:7955): GStreamer-CRITICAL **: 16:32:41.347: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (711) open OpenCV | **GStreamer warning: Error opening bin: no element "video"**
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
(python:7955): GStreamer-CRITICAL **: 16:32:41.359: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (711) open OpenCV | **GStreamer warning: Error opening bin: no element "video"**
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
Unable to open any cameras
I also understood your point, the order of the parameter is really important then. I used your part of code, but I’m still getting different errors, I could punch my monitor sooner or later :DDD
This time I’m getting these errors:
- Something similar to:
GStreamer warning: Error opening bin: could not set property "sensor-id" in element "nvarguscamerasrc0" to "0"
- This one is pretty awkward
Traceback (most recent call last):
File "dual_exp.py", line 197, in <module>
start_cameras()
File "dual_exp.py", line 145, in start_cameras
display_width=960,
File "dual_exp.py", line 130, in gstreamer_pipeline
display_height,
TypeError: not enough arguments for format string
This is the part of code I use to initialize the first camera (same code for the second one):
left_camera = CSI_Camera()
left_camera.open(
gstreamer_pipeline(
sensor_id=0,
exposuretime_low=1000000,
exposuretime_high=1000000,
framerate=30,
flip_method=0,
display_height=540,
display_width=960,
)
)
left_camera.start()