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

Hello guys,
I am trying to use Xavier NX for multiple video streams living, the OS is Linux Ubuntu, I am trying to use four cameras, can everybody share an example C or C++ code with me?

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

I don’t want to use Gstreamer, I am trying to use Nvidia Multimedia SDK for developing, in the samples I don’t see any examples for V4L2 capturing, converting and encoding, do you have the samples, especially for four or more cameras?
Thanks a lot.


if you want to use the V4L capabilities of the jetson take a look at GitHub - dusty-nv/jetson-utils: C++/Python Linux utility wrappers for NVIDIA Jetson - camera, codecs, CUDA, GStreamer, HID, OpenGL/XGL, it has some basic wrappers for the mentioned capabilities.
But I am also very interested how you may solve this task in an other way