Hi,
For feeding NvBufsurface in output plane, you don’t need to fill in NvBuffer. Please also refer to this patch:
How to use v4l2 to capture videos in Jetson Orin r35 Jetpack 5.0 and encode them using a hardware encoding chip - #8 by DaneLLL
And please check write_video_frame() for getting encoded stream in capture plane.