CUDA Video encoder filter

Hi everyone,

I follow the document which “CUDA_VideoEncoder_Library.pdf” and I add the NVIDIA CUDA Video encoder DirectShow filter to my graph.
It can work but it has lag while playback.

I upload my sample code to here.
please help me and tell me what’s wrong
Thank you
playcap_toNVidia.zip (3.85 MB)