Nvstreamtiler changing tile order

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) GPU
• DeepStream Version 5.1
• TensorRT Version The latest version that came with Deepstream 5.1
• NVIDIA GPU Driver Version (valid for GPU only) 460.39
• Issue Type( questions, new requirements, bugs) Question

Hello,

I’m currently using the nvstreamtiler element to tile the incoming frames and send the output as a single frame.

My first requirement is that the user would provide the rows and columns and then depending on that the frames are tiled, the extra cells should be a black frame, which works fine right away.

The pipeline I used is -

gst-launch-1.0 nvstreammux name=m batch-size=2 width=1280 height=720 uridecodebin uri=‘file:///opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample_1080p_h264.mp4’ name=uria ! m.sink_0 uridecodebin uri=‘file:///opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample_1080p_h264.mp4’ name= urib ! m.sink_1 m.src ! nvmultistreamtiler width=1280 height=720 rows =2 columns =2 ! nvvideoconvert ! “video/x-raw(memory:NVMM), format=NV12” ! nvv4l2h264enc ! h264parse ! flvmux latency=200 ! rtmpsink location=‘rtmp://18.153.xxx.xx/streamkey’

From the docs, I understand the frames are tiled in a certain sequence. Gst-nvmultistreamtiler — DeepStream 6.3 Release documentation

The plugin composites the tile based on stream IDs, obtained from NvDsBatchMeta and NvDsFrameMeta in row-major order (starting from source 0, left to right across the top row, then across the next row)

My current requirement is to tile them in a custom order.
That is let’s say I have 2 sources, and I set rows, and columns to be =2.
The current tiled output looks like this (the pic I’ve added above)

[ stream-id=0 | stream-id=1 ]
[ x | x ]
(where x denotes black-frame)

I’d like it to be like
[ stream-id=0 | x ]
[ x | stream-id=1 ]

I don’t want to change the resolution of the frames, just change the order.
I know we can access the stream-id by adding a probe to the sink pad of tiler, and then use source_id property (https://docs.nvidia.com/metropolis/deepstream/python-api/PYTHON_API/NvDsBufsurface/NvBufSurfaceColorFormatDoc.html#pyds.NvDsFrameMeta.source_id) to fetch the frame corresponding to the source, would like some info to use that info to reconfigure the tiled order

Thanks in advance
-santosh

You can try to change “m.sink_1” to “m.sink_3” in the gst-launch pipeline you post.

1 Like

Thank you for the quick response @Fiona, it works as intended.