I need to encode a raw video stream captured from a camera to h264. I'm using an NVIDIA Pascal GPU under Windows 7 and am trying to use FFmpeg to control the h264_nvenc, rather than the NVIDIA SDK directly.
Using libavcodec, I've got a program that successfully encodes the input stream using avcodec_encode_video2(). This function takes the input image from a buffer in RAM and DMAs it to the GPU where it is encoded.
I now want to encode an image that is already on the GPU (in a CUDA buffer). Looking at the documentation and various examples for FFmpeg, I didn't find any pointers as to how to do this.
Does anybody know if this is possible, and if so how to do it?