Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU): GeForce RXT 3090
• DeepStream Version: 6.1.1
• TensorRT Version: 8.4.1.5
• NVIDIA GPU Driver Version (valid for GPU only): 515.65.01
• Issue Type( questions, new requirements, bugs): question
My pipeline has 2 sources and its high-level view is as follow:
sources -> muxer -> pgie -> dexmuxer |-> muxer -> sgie-1 |
|-> .... | -> metamuxer -> sink
|-> muxer -> sgie-n |
- There are 2 sources
- There are
n
sgies running in parallel - Each branch uses both sources
- The pipeline doesn’t have a tracker
I have these 2 probes:
GstPadProbeReturn pgie_src_probe(
GstPad *pad,
GstPadProbeInfo *info,
gpointer u_data)
{
GstBuffer *buf = (GstBuffer *)info->data;
NvDsMetaList *l_frame = NULL;
NvDsFrameMeta *frame_meta = NULL;
NvDsBatchMeta *batch_meta = gst_buffer_get_nvds_batch_meta(buf);
static guint batch_id = 0;
g_message("==============BATCH[%d]==============", batch_id);
for (l_frame = batch_meta->frame_meta_list; l_frame != NULL; l_frame = l_frame->next)
{
frame_meta = (NvDsFrameMeta *)(l_frame->data);
g_message("%s: num frames = %d, frame_meta->batch_id=%d, frame_meta->buf_pts=%ld", __func__, g_list_length(batch_meta->frame_meta_list), frame_meta->batch_id, frame_meta->buf_pts);
}
batch_id++;
return GST_PAD_PROBE_OK;
}
GstPadProbeReturn metamux_src_probe(
GstPad *pad,
GstPadProbeInfo *info,
gpointer u_data)
{
GstBuffer *buf = (GstBuffer *)info->data;
NvDsMetaList *l_frame = NULL;
NvDsFrameMeta *frame_meta = NULL;
NvDsBatchMeta *batch_meta = gst_buffer_get_nvds_batch_meta(buf);
static guint batch_id = 0;
for (l_frame = batch_meta->frame_meta_list; l_frame != NULL; l_frame = l_frame->next)
{
frame_meta = (NvDsFrameMeta *)(l_frame->data);
if(frame_meta->batch_id >= g_list_length(batch_meta->frame_meta_list))
{
g_message("==============BATCH[%d]==============", batch_id);
g_message("%s: num frames = %d but frame_meta->batch_id=%d, frame_meta->buf_pts=%ld", __func__, g_list_length(batch_meta->frame_meta_list), frame_meta->batch_id, frame_meta->buf_pts);
}
}
batch_id++;
return GST_PAD_PROBE_OK;
}
-
pgie_src_probe
is attached to the pgie’s src pad -
metamux_src_probe
is attached to the metamux’s src pad
Both of these probes just iterate the batch meta’s frame_meta_list and print the number of frames in the batch, each frame’s batch_id and buf_pts. metamux_src_probe
only prints when it detects that a frame whose batch_id is invalid based on the batch size.
I observe odd behaviour:
Please pay attention to batch 76, after pgie, the batch size is 1 and frame batch_id is 0 which is expected, however, after metamux, the batch size is the same but the batch_id is changed to 1, which is wrong because frame_meta->batch_id “Holds the location of the frame in the batch”, if the batch size 1, there can be no position at index 1 since we’re using 0-indexed. The frame_meta->buf_pts
is identical at both probe for batch 76 so I don’t think the cause is pts-tolerance
is too low (I set it to 360ms or 360000 micoseconds).
Is this expected behaviour?