4 videos in 1 source

I’m running the pipeline below using deepstream python binding.


The source is mjpeg-stream which combines 4 videos on one screen.
Divide into 4 screens using tee and nvvideoconvert.
When frame_meta.source_id and frame_meta.batch_id are displayed with the osd_sink_pad_buffer_probe function, all 0s are returned.
Is there a way to distinguish each screen?
Since obj_meta.object_id may return the same value on each screen, it is necessary to distinguish between screens.
Thank you.

Do you mean you want to display the four videos on 4 screens? If so, you can use nvstreamdemux Gst-nvstreamdemux — DeepStream 6.3 Release documentation to separate the muxed streams after nvtracker and remove nvmultistreamtiler and nvdsosd.

Even obj_meta.object_id may be the same, the corresponding frame_meta.source_id is different.

Thank you for your reply.
I’m sorry for my poor English.

In my case, the same “object_id” but all “source_id” get 0.Probably because there is only one input source.

For example, I want to get the video on the upper left as “source_id = 0”, the video on the upper right as “source_id = 1”, and the video on the lower left as “source_id = 2”.

In this case, is there any metadata like “source_id”?
Or do I need to have multiple inputs with the same source?

Because after nvmultistreamtiler, all streams will be combined into one stream, there is only one stream in osd_sink_pad_buffer_probe() since osd_sink_pad_buffer_probe() is after nvmultistreamtiler.

“source_id” is OK before nvmultistreamtiler.

1 Like

It seems that my understanding was not enough.
It became a clue to the solution.
Thank you!