How to guarantee that deepstream works in live mode?

• Hardware Platform (Jetson / GPU) NVIDIA A2
• DeepStream Version 6.3
• TensorRT Version 8.4.0
• NVIDIA GPU Driver Version (valid for GPU only) 535.129.03

Hello,

I have two separate instances of DeepStream containers serving e.g. 30 cameras (split on the two instances). Apparently, the two instances can’t see each other, they are totally Async. The pipelines do some detection and classification after that, I send messages using Kafka to another service (multi-camera tracker).

The issue is when I run different numbers of streams on the two instances, for example, 3 on instance_1 and 4 on instance_2. The first instance is faster than the second instance, so the messages sent from instance_1 are not synced with the messages sent from instance_2.

Is there any way to make them sync? Like forcing the first instance to be slower or to make sure that both of them process the same frame number?

Appreciate your help.

No.

There is timestamp in the messages sent to the service(multi-camera tracker), you need to handle the messages with the timestamps which may help you to synchronize the messages.

Is there an implemented module that does that work?

And should I sync them using NTP or PTS?

No. The work should be done in your service but not in DeepStream pipeline.

Depends on your use case.

Can you elaborate? I can explain the use case to you.
I created two Deepstream containers serving the RTSP streams. For example, if I have 30 cameras, 15 are served using the first container, and the rest using the second container.

I dumped the probe logs in a file, I can see that at frame X in service 1 or 2, the PTS and NTP are not identically the same. I am not sure which one should I use.

appreciate your support.

I have another question that may seem irrelevant, but it’s not. If service 1 was running and the second one was down. Then, I started service 2, I can see in the probe function that at time t0 service 1 processes frame number X, but service 2 processes frame X-100 for example. Is this just the enumerating system of Deepstream? or is it processing different frames?

I am assuming that since I am using RTSP streams (real-time streams) at t0 all sources should be working on the same frame timestamp.

This is because the original cameras are not synchronized. You can use either PTS or NTP.
Can you check with the original camera first? If the timestamp is correct, it is possible to align the frames from different cameras with some tolerance.

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

It depends. The different RTSP clients may have different delay for the same RTSP server. The frame index in the RTSP client does not mean the same frame in different client.

The different RTSP clients may have different delay for the same RTSP server, let alone different RTSP servers(the 30 RTSP cameras are 30 different RTSP servers).

RFC 2326 - Real Time Streaming Protocol (RTSP) (ietf.org)