The reason of the text disappearance with RGBA format is because the alpha blending, in nvinfer plugin(please refer to the source code in /opt/nvidia/deepstream/deepstream-5.0/sources/gst-plugins/gst-nvinfer/gstnvinfer_meta_utils.cpp, in attach_metadata_detector() function (the same case with attach_metadata_classifier() function) , the text color is set as white and background color is black. Black is the same to the alpha 0, so the text area is transparent in the display. This will not happen with NV12 format because there is no alpha for YUV format.
The resolution is to set background color to other colors (even (0.001, 0.001 , 0.001, 1) can work), or you can also disable the text background with setting “text_params.set_bg_clr = 0;”.
The nvinfer is open source for customization, you can modify the code and build the new gstnvinfer plugin for your case.
There is also another method to show text with RGBA format without modifying gstnvinfer plugin. You can write your own deepstream app just as our deepstream samples C/C++ Sample Apps Source Details — DeepStream 6.1.1 Release documentation, with deepstream app, you can change the display color and text color with pad probe function.
I moved nvvideoconvert before nvstreammux, set caps and changed background color in osd_sink_pad_buffer_probe function in deepstream-test-app1, but no success.