Hi,
I’m implementing a GStreamer pipeline similar to what is used on the example pipeline with resolution preservation (tappas/docs/pipelines/single_network.rst at 0f4813c7683f388886b9900ceaeeb0c4ec49a3f0 · hailo-ai/tappas · GitHub).
For my app, I need to catch also the stream_id. However, when I use “tee” in the pipeline the stream_id is always empty. If I remove the tee the stream_id appears as an SHA256 code
There is any solution for that?
The pipeline:
source_element = f"rtspsrc location={self.video_source} name=src message-forward=true ! "
source_element += "rtph264depay !"
source_element += QUEUE(f"queue_rtsp", max_size_buffers=30)
source_element += "decodebin ! queue leaky=downstream max-size-buffers=5 max-size-bytes=0 max-size-time=0 ! "
source_element += "video/x-raw, format=I420 ! "
source_element += QUEUE("queue_src_convert", max_size_buffers=5)
source_element += f"videoconvert n-threads=3 name=src_convert ! "
pipeline_string = source_element
pipeline_string += "tee name=t hailomuxer name=hmux "
pipeline_string += "t. ! "
pipeline_string += QUEUE("bypass_queue", max_size_buffers=20)
pipeline_string += "hmux.sink_0 "
pipeline_string += "t. ! "
pipeline_string += "videoscale ! "
pipeline_string += QUEUE("queue_hailonet", max_size_buffers=5)
pipeline_string += f"hailonet hef-path={self.hef_path} batch-size=1 {thresholds_str} ! "
pipeline_string += QUEUE("queue_hailofilter", max_size_buffers=5)
pipeline_string += f"hailofilter function-name={self.default_network_name} so-path={self.default_postprocess_so} qos=false ! "
pipeline_string += "queue leaky=no max-size-buffers=30 max-size-bytes=0 max-size-time=0 ! "
pipeline_string += "hailotracker name=hailo_tracker class-id=-1 keep-past-metadata=true kalman-dist-thr=.5 iou-thr=.6 keep-tracked-frames=2 keep-lost-frames=2 ! "
pipeline_string += QUEUE("queue_hmuc")
pipeline_string += "hmux.sink_1 "
pipeline_string += "hmux. ! "
pipeline_string += QUEUE("queue_hailopython", max_size_buffers=5)
pipeline_string += f"hailopython qos=false module={self.options_menu.python_module} ! "
pipeline_string += QUEUE("queue_hailooverlay", max_size_buffers=5)
pipeline_string += f"hailooverlay ! "
pipeline_string += QUEUE("queue_videoconvert", max_size_buffers=5)
pipeline_string += f"videoconvert n-threads=3 ! "
pipeline_string += f"fpsdisplaysink vide
The callback function:
def run(video_frame: VideoFrame):
stream_id = video_frame.roi.get_stream_id()
width = video_frame.video_info.width
height = video_frame.video_info.height
print(stream_id, width, height)
return Gst.FlowReturn.OK