hi everyone !
im trying to improve my stability on my deepstream-app , im running a simple object detection configuration on some rtsp streams.
im using the reference app deepstream-app on a rather basic configuration and sending inference results via kafka.
i would like to achieve a couple of things but im not sure how:
- monitor avg fps on streams ( the data that is outputted to the console … ) - aka :
**PERF: FPS 0 (Avg) FPS 1 (Avg)
**PERF: 0.00 (0.00) 0.00 (0.00)
**PERF: 29.26 (29.23) 29.26 (29.23)
**PERF: 24.99 (27.11) 24.99 (27.11)
**PERF: 25.00 (26.41) 25.00 (26.41)
to detect when and if the app is slowing down i would like to get this output via kafka - to the same topic as the detections go or a different one if possible.
would help to add the src id to the avg so i know which src has which avg.
- i would like to be notified when a camera is disconnected from rtsp, i know when a source loses connection theres an auto reconnect interval which works great - but i would like to monitor these outages and send them via kafka to know when a src is down.
i went through the forums and ran into a conversation that lead me to this function in the file: deemstream_source_bin.c
static GstPadProbeReturn
rtspsrc_monitor_probe_func (GstPad * pad, GstPadProbeInfo * info,
gpointer u_data)
{
NvDsSrcBin *bin = (NvDsSrcBin *) u_data;
if (info->type & GST_PAD_PROBE_TYPE_BUFFER) {
g_mutex_lock (&bin->bin_lock);
gettimeofday (&bin->last_buffer_time, NULL);
bin->have_eos = FALSE;
g_mutex_unlock (&bin->bin_lock);
}
if (info->type & GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) {
if (GST_EVENT_TYPE (info->data) == GST_EVENT_EOS) {
bin->have_eos = TRUE;
check_rtsp_reconnection_attempts (bin);
}
}
return GST_PAD_PROBE_OK;
}
problem is:
a) i dont know how or what to add to it so it sends kafka some content
b) i dont know what content runs through it
c) i dont know what or where to add this function after i alternate it to send kafka events.
- get the error/warning output from deepstream through kafka to monitor the app remotely, im not even sure if its possible but would be awsome to be notified when the deepstream-app crashes but i doubt it can send somthing on the way down - probably need to monitor the thread that runs the app from the outside but i was wondering how to get the rest of the output.
any information would be much appreciated,
many thanks !