I am developing a gstreamer pipeline on Xavier NX. The pipeline captures frames from a v4l device, encodes them (h.265 CBR), package it in mpegts format and stream it in udp packets. However, I encounter a problem with the packet transmission rate. The destination module of this output stream (between the encoder and the decoder) has a very limited buffer size that cannot accommodate the output packets rate of the pipeline. Consequently, some packets are dropped and the decoded video has a very poor quality. I need a solution to control the packet transmission rate according to the buffer capacity constraint (in my case, the maximum rate is two packets of 1400 bytes each per 1msec).
I tried to change the various parameters of the compressor. It didn't really affect, except for the bitrate parameter (but that's obviously not a solution). I tried changing the parameters of the udpsink element but could not achieve the required feat. In practice, the pipeline outputs between 5 and 10 packets at any given moment (with small differences of microseconds) and when an i-frame passes it jumps to a few tens of packets