Here is some more information. I do have to tear down and recreate the nvstreammux or else it sends the EOS immediately on subsequent streams after the first one.
Then I noticed that the EOS is being sent for the second stream too early still, but if I listen for the Deepstream EOS message (number 102918) in the last sink element and close down the stream on that, then all of the frames are processed. By the way, I also have a nvstreamdemux on the other side of my infer element(s) and then I listen on the sink of the corresponding stream.
Here are some other strange things that I’ve noticed though:
- EOS is received in the bus multiple times per stream when multiple streams are hooked up. It seems to match with how many streams are attached at the time. This isn’t so hard to work around, but it was unexpected.
- 1 or 2 streams at a time seems to work pretty well. 3 and especially 4 streams are when things start failing. I no longer get a bus EOS event for one of the streams when I have 4 streams attached. I get crashes if I trigger shutting down the stream based on the EOS in the sink.
- some settings of batch-size in nvstreammux cause problems to occur. Even with a passthrough (videoconverter) in place of my infer element, I get problems with setting the batch-size on streammux. A batch-size of 1 or 2 with one stream set up seems to work, but a batch-size of 4 causes it to start processing, but deadlocks after a few frames (4) are processed. I’ve tried larger values of the batch-size and they also seem to deadlock after 4 frames. I just looked through the examples in the Deepstream SDK and they all appear to have a batch-size of 1 for the nvstreammux element. Have larger values been tested? I have a fakesink in place of my regular sink in this case to eliminate that as a possible issue. The stream is uridecodebin -> nvstreammux -> videoconverter (instead of nvinfer) -> nvstreamdemux -> fakesink. The batched-push-timeout is set to 40000 microseconds.
I’ll try to come up with some example code, but my current code uses Rust bindings and has some other elements like pulling from and pushing to external message queues.
For now, it looks like I’m stuck with 1 or 2 streams at a time for now with a batch-size of 1 and setting up and tearing down the nvstreammux element every time. Any ideas?
Also, is there any way for me to sign an NDA and help fix these issues?