Hi,
Preview + encode is similar to the server command in
Gstreamer TCPserversink 2-3 seconds latency - #5 by DaneLLL
The frames are sent to nveglglessink for camera preview. In this path it does not pass through H264 codec.
In the path the frames are sent to nvv4l2h264enc(need to be replaced with x264enc when using Orin Nano), it passes through H264 codec.