FFMPEG vs Video Codec API

  1. I am working with FFMPEG compiled on my machine (I have Quadro RTX 5000). Is there any advantage (performance wise) to using nvenc/nvdec API from NVIDIA Video Codec SDK compared to using FFMPEG with nvenc/nvdec from the command line?

  2. In my use case, I need to compress 4K frames arriving from a camera in 60FPS. The compressed video is simply stored for later analysis - not streamed or used in any other way.
    What is the best way to perform this task? should I allocate a buffer on the GPU? How can I measure the actual compression latency without taking into account host/device transmissions?

  3. Working with Quadro RTX 5000 and 4K frames, FFMPEG encoding speed is about 42FPS with speed=1.74x. Is this normal? is it possible to get encoding speed of 60FPS+ for 4K frames with Quadro RTX 5000?

FFmpeg uses the NVIDIA Video Codec SDK so should be ideal and I can’t see what the advantage would be of writing your own app to use the same SDK.

Speed wise - if the capture is 60fps and the speed 1.74x then I don’t see how that equates to 42fps.

Perhaps you could post your exact command line and maybe even a link to a clip of your source so that others can help
you properly.