1- There is a physical monitor connected with jetson, yes.
2- I am running the application in docker container. Tried to add some timeout to code and setting DISPLAY=:0 it did not worked. My docker container creating command is this :
xhost + && docker run -ti --gpus all --net=host --ipc=host --device=/dev/video0 --device=/dev/video1 --privileged=true -e NVIDIA_DRIVER_CAPABILITIES=“compute,video,utility,display” -v /home/xxx/xxx/xxx:xxx -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/xxx/.xxx/xxx:/xxx/*** cdcr.dev/xxx/xxx-xxx-xxx:xxx-xxx-xxx
3- I am creating pipeline with these functions , both of them does not work:
def create_csi_bin(self,source_info):
time.sleep(1)
source_bin = self._gst_helper._create_gst_bin(f"source-bin-{source_info.id}")
"""nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=640,height=480,framerate=30/1' ! nvvidconv ! 'video/x-raw, format=I420' ! queue ! autovideosink"""
csisrc = self._gst_helper._create_gst_elem("nvarguscamerasrc", f"csicam-{source_info.id}")
csisrc.set_property("sensor-id", 0)
capsfilter = self._gst_helper._create_gst_elem("capsfilter", f"capsfilter-{source_info.id}")
capsfilter.set_property("caps", Gst.Caps.from_string('video/x-raw(memory:NVMM),width=640,height=480,framerate=30/1'))
# videoconvert to make sure a superset of raw formats are supported
videoconvert = self._gst_helper._create_gst_elem("nvvidconv", f"videoconvert-{source_info.id}")
capsfilter2 = self._gst_helper._create_gst_elem("capsfilter2", f"capsfilter2-{source_info.id}")
capsfilter2.set_property("caps", Gst.Caps.from_string("video/x-raw, format=I420"))
# nvvideoconvert to convert incoming raw buffers to NVMM Mem (NvBufSurface API)
queue = self._gst_helper._create_gst_elem("queue", f"queue-{source_info.id}")
# nvvideoconvert.set_property(
# 'compute-hw', self.nvvideoconvert_computehw)
# nvvideoconvert.set_property(
# 'nvbuf-memory-type', self.nvvideoconvert_memtype)
queue.set_property("silent", 1)
capsfilter3 = self._gst_helper._create_gst_elem("capsfilter3", f"capsfilter3-{source_info.id}")
capsfilter3.set_property("caps", Gst.Caps.from_string("video/x-raw(memory:NVMM)"))
# Add all elements that is created above to the GST Bin
Gst.Bin.add(source_bin, csisrc)
Gst.Bin.add(source_bin, capsfilter)
Gst.Bin.add(source_bin, videoconvert)
Gst.Bin.add(source_bin, capsfilter2)
Gst.Bin.add(source_bin, queue)
Gst.Bin.add(source_bin, capsfilter3)
# Link elements in the bin
csisrc.link(capsfilter)
capsfilter.link(videoconvert)
videoconvert.link(capsfilter2)
capsfilter2.link(queue)
queue.link(capsfilter3)
# We get src pad of the capsfilter (the last element on decoding process),
# and creates src ghostpad for the bin that is binded to created src pad.
capsfilter3_src_pad = self._gst_helper._get_gst_static_pad(capsfilter3, "src")
self._gst_helper._create_new_gst_ghost_pad(source_bin, "src", capsfilter3_src_pad)
logger.info(
f"Created USB bin for {source_info.url} with name {source_bin.get_name()} for source {source_info.id}"
)
return source_bin
def create_csi_bin(self,source_info):
"""nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=640,height=480,framerate=30/1' ! nvvidconv ! 'video/x-raw, format=I420' ! queue ! autovideosink"""
identity_sink_name = f"identity-sink-{source_info.id}"
if self.params.is_jetson:
gst_elements = [
f"nvarguscamerasrc sensor-id=0",
"'video/x-raw(memory:NVMM),width=640,height=480,framerate=30/1'",
"nvvidconv",
f"'video/x-raw, format=I420'",
"queue"
f"identity name={identity_sink_name} silent=1",
]
gst_bin_str = " ! ".join(gst_elements)
logger.info(gst_bin_str)
source_bin = Gst.parse_launch(gst_bin_str)
source_bin.set_name(f"source-bin-{source_info.id}")
identity_element = self._gst_helper._get_gst_elem(source_bin, identity_sink_name)
identity_src_pad = self._gst_helper._get_gst_static_pad(identity_element, "src")
self._gst_helper._create_new_gst_ghost_pad(source_bin, "src", identity_src_pad)
logger.info(
f"Created HTTP bin for {source_info.url} with name {source_bin.get_name()} for source {source_info.id}"
)
return source_bin
And i tried nvoverlaysink, fakesink and autovideosink ( in different module they are linking) it did not work.