I have followed the steps available at https://developer.nvidia.com/ffmpeg.
I have compiled used
ret = av_hwdevice_ctx_create(&encode_device, AV_HWDEVICE_TYPE_CUDA,
“/dev/nvidia0”, NULL, 0);
p_enc_codec = avcodec_find_encoder_by_name(“h264_nvenc”);
I don’t see any error, while I compile or run my application, however, when I check my application still utilizing CPU for the compute instead of GPU.
In my system, I have Quadro M620 GPU.
Anybody has any idea why? Any sample code with libavcodec.