It is not reasonable to ask us to debug your code unless you can prove that it is a deepstream problem(either you find the problem is caused by some deepstream plugin or you find the problem is caused by some deepstream configuration). Can you write the “gst-launch-1.0” command to prove your pipeline in the attached cpp file is correct? Or you can dump the gstreamer graph file for analysis, the graph dump method is in DeepStream SDK FAQ - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums.
After a glimpse to your code, the nvmultistreamtiler should not be put after nvdsosd, please refer to the original deepstream-test3 sample code.
And we have a known bug for nvstreamdemux with RGBA format. DeepStream 5.0.1 nvstreamdemux core dump after RGBA conversion - Intelligent Video Analytics / DeepStream SDK - NVIDIA Developer Forums, please avoid this in your pipeline.