How can I decode frame using GPU on Jetson Xavier

Hello everyone!

I am currently looking to read a frame (from a video), directly with the GPU using a Jetson Xavier.
The board is on Ubuntu 18.04 and Cuda 10.2

I already managed to read a video and upload each frame on the GPU with OpenCV C++, but now I would like to directly decode the frame using the GPU.
From what I understood I can’t directly read a frame with OpenCV (on GPU) because we need NvCuvid which is not available for Jetson Xavier.

So I know that VPI, VisionWorks and GStream are installed on my board. How can I use and which should I use to read a frame without using CPU.
Is there some code example in C++ ?

Thanks for your time and consideration.

Moving to Jetson Xavier forum for resolution.

In Xavier, the hardware video decoder is NVDEC. Please check the 00_video_decode sample:


It demonsatrates decoding YUV frames into NvBuffer. And you can refer to cuda_postprocess() in 12_camera_v4l2_cuda to access the buffers through CUDA.