Hi,
Since OpenCV uses BGR format which is not supported by hardware engines in Jetson chip, would need to take certain CPU usage in this case. An optimal solution is to run gstreamer pipeline and use OpenCV CUDA filter filter. There is a sample for this usecase:
Nano not using GPU with gstreamer/python. Slow FPS, dropped frames - #8 by DaneLLL
Please check the sample and see if you can apply it to your usecase. If you have to run with cv::VideoWriter, please execute sudo nvpmodel -m 0 and sudo jetson_clocks to get max throughput of CPU cores.