Xavier NX for 4 cameras V4L2 capture, converter, H265 encode and RTP over UDP transfer

Hi,
You may try the use-case in gst-launch-1.0 command. Please refer to the posts:
Delay in video - #5 by DaneLLL
Jetson 4k Encoding -> Decoding Pipeline and latency - #11 by DaneLLL
Gstreamer TCPserversink 2-3 seconds latency - #5 by DaneLLL

Once you have a working pipeline, you can launch the same by calling gst_parse_launch() in C/C++. Please check this sample:
GStreamer freeze when using qtmux and NVIDIA-accelerated h264/h265 encoding - #7 by DaneLLL