Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU): 3090
• DeepStream Version: 6.2
• TensorRT Version: 8.5.2
• NVIDIA GPU Driver Version (valid for GPU only): 525.89.02
• Issue Type( questions, new requirements, bugs): questions
I create a pipeline for multiple sources with nvstreammux
and nvstreamdemux
。 when sources are done, I get multiple EOS messages from nvstreammux
. I set num_sources = 3
.
nvstreammux: Successfully handled EOS for source_id=1
nvstreammux: Successfully handled EOS for source_id=2
nvstreammux: Successfully handled EOS for source_id=0
** Message: 09:13:19.038: get message from element nvstreammux0 : stream-eos
Got EOS from stream 0
** Message: 09:13:19.038: get message from element nvstreammux0 : stream-eos
Got EOS from stream 0
** Message: 09:13:19.038: get message from element nvstreammux0 : stream-eos
Got EOS from stream 0
** Message: 09:13:19.038: get message from element nvstreammux0 : stream-eos
Got EOS from stream 2
** Message: 09:13:19.038: get message from element nvstreammux0 : stream-eos
Got EOS from stream 2
** Message: 09:13:19.038: get message from element nvstreammux0 : stream-eos
Got EOS from stream 2
** Message: 09:13:19.038: get message from element nvstreammux0 : stream-eos
Got EOS from stream 1
** Message: 09:13:19.038: get message from element nvstreammux0 : stream-eos
Got EOS from stream 1
** Message: 09:13:19.038: get message from element nvstreammux0 : stream-eos
Got EOS from stream 1
num_sources = 3
, get 9 messages.
num_sources = 2
, get 4 messages.
num_sources = 1
, get 1 messages.
I use GST_DEBUG=5 to debug and find each src pad of nvstreamdemux will forward the element message from nvstreammux.
I guess the stream-eos element message of nvstreammux for each source is forwarded on each src pad of nvstreamdemux and thus the bus receive num_sources^2
EOS messages.
Is my guess correct? Are the multiple forwardings the feature of nvstreamdemux?
How to ensure that only 1 Got EOS from stream
message is produced for each source?
Similar to EOS is sent twice for the same stream in dynamic sink addition/removal
Update: When I delete nvstreamdemux, the number of the EOS message is right.
Set the value of per-stream-eos
property to true, You can get more information from gst-inspect-1.0 nvstreamdemux
.
This is a feature of nvstreamdemux
.
Thank you very much! You save my day!!!
the new nvstreammux works.
I carefully read the nvstreammux new and nvstreammux docs, but no difference related to this problem found.
Can you explain what cause this problem ? Why the new nvstreammux works ? Is it the bug of the old nvstreammux for multiple sources?
The solution is changed?
It seems that there is no per-stream-eos
property in nvstreammux
and nvstreamdemux
.
Inpsecting the plugin has no information about it.
This is another option, this property belongs to the legacy nvstreamdemux
.
I think it may be because the new nvstreamdemux
does not implement this feature.
How to enable the legacy nvstreamdemux
?
the per-stream-eos
property can be configured but does not seem to work.
g_object_set(G_OBJECT(demux), “per-stream-eos”, true, NULL);
Update: legacy nvstreammdemux can be enabled using default nvstreammux.
The log of per-stream-eos = true
nvstreammux: Successfully handled EOS for source_id=1
nvstreammux: Successfully handled EOS for source_id=0
nvstreammux: Successfully handled EOS for source_id=2
** Message: 15:19:31.841: get message from element nvstreammux0 : stream-eos
Got EOS from stream 2
** Message: 15:19:31.841: get message from element nvstreammux0 : stream-eos
Got EOS from stream 2
** Message: 15:19:31.841: get message from element nvstreammux0 : stream-eos
Got EOS from stream 2
** Message: 15:19:31.841: get message from element nvstreammux0 : stream-eos
Got EOS from stream 0
** Message: 15:19:31.841: get message from element nvstreammux0 : stream-eos
Got EOS from stream 0
** Message: 15:19:31.841: get message from element nvstreammux0 : stream-eos
Got EOS from stream 1
Only reduce the number of messages but cannot completely eliminate duplicate messages.
Sorry, I think this is a bug and it is not what I expected, We will discuss internally how to deal with this.
You can use new streammux
as a solution.
This is because EOS messages cannot be attached with source_id
, so they are forwarded to each src pads of nvstreamdemux
.
OK, I update the log of per-stream-eos = true
.
If there is any update, I would be happy to do the test.
1 Like