How to save inference results to file in deepstream

1 please refer to deepstream-app, it can save output to file after inference, the path is:
start command is like this: deepstream-app -c …/…/…/…/samples/configs/deepstream-app/source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8.txt
you can enable [sink2], set type to 3. here are some parameters description : Gst-nvinfer — DeepStream 6.3 Release documentation

2 use your model in the configure file, and set your model as primary gie. please refer to this link: