I have a jetson xavier.
I have a small application, which reads a 4k 30 fps video using opencv, processes it and writes a processed video.
In my complete pipeline most of the time is being consumed in reading the video (I suppose most of it is going into decoding it). and writing the video (I suppose most of the time is going in encoding the video). I tried compiling opencv with CUDA and use opencv cv2.cudacodec_VideoReader and cv2.cudacodec_VideoWriter, but so far I have not been successful in using those. I have read that jetson has hardware based video encoding and decoding.
My question is
Is there any way I can take use of the hardware encoding decoding with opencv to reduce my processing time?