Desktop Duplication API skip frame issue and slowness issue

Rangesh Gupta 96 Reputation points
2021-07-01T12:31:27.313+00:00

Setup Details: Windows 2016, NVIDIA Quadro P4000, Driver Version: 465.89 , CUDA Version: 11.3.

We are trying below example where it captures windows screen using DDA, do h264 encoding using nvenc and output to a video file.

https://github.com/NVIDIA/video-sdk-samples/tree/master/nvEncDXGIOutputDuplicationSample

Issue 1:

While recording the video I have a timer on the screen, After screen recording if we watch the video, there is skip of frames. Time jumps from 10.21.53 to 10.22.07.

Issue 2:

While calling AcquireNextFrame with wait time 5 milliseconds, sometime I observer higher accumulated frame.

“frameNo: 108 | Accumulated: 68 | PTS: 8007481246593 | PTSInterval: 13918215000”

Issue 3:

Even with AcquireNextFrame with wait time 5 milliseconds, some time it take more than a second to come out of the function AcquireNextFrame

Any help is this area will be helpful.

Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,254 questions
0 comments No comments
{count} votes

6 additional answers

Sort by: Most helpful
  1. Leila Kong 3,691 Reputation points
    2021-07-02T08:10:47.25+00:00

    Hello @Rangesh Gupta ,

    Thanks for your query.

    1.Is there any error message in the event log?

    2.Please refer to the following post for troubleshooting:
    (1) DirectX Screen Capture - Desktop Duplication API - limited frame rate of AcquireNextFrame: https://stackoverflow.com/questions/44403173/directx-screen-capture-desktop-duplication-api-limited-frame-rate-of-acquire

    (2) Desktop Duplication API by design accumulates monitor ("output" in DXGI terms) updates until you request them via AcquireNextFrame. The API is not designed to capture every update in first place. Calling ReleaseFrame earlier or later affects internal behavior of the API. It is either accumulating updates in general or also keeps replicating the actual payload data into duplicated frame resources.
    DXGI Desktop Duplication Screen Capture Speed : https://stackoverflow.com/questions/48278207/dxgi-desktop-duplication-screen-capture-speed

    Best regards,
    Leila


    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Leila Kong 3,691 Reputation points
    2021-07-06T09:35:22.04+00:00

    Hello @Rangesh Gupta ,

    Just checking in to see if the information provided was helpful.
    If you would like further assistance do let us know.

    0 comments No comments

  3. Leila Kong 3,691 Reputation points
    2021-07-12T03:31:47.013+00:00

    Hello @Rangesh Gupta ,

    Thanks for your response.

    From below picture we can see that NVIDIA Quadro P4000 doesn't support Windows server 2016, which may cause some problem.
    https://www.nvidia.cn/Download/index.aspx?lang=cn

    113686-nvidia-%E9%A9%B1%E5%8A%A8%E7%A8%8B%E5%BA%8F%E4%B8%8B%E8%BD%BD.png

    Please consult the manufacturer of NVIDIA Quadro P4000. If the manufacturer cannot give a reply, we sincerely recommend that you open a premier case to Microsoft for further help: https://hubstaticsite.z5.web.core.windows.net/
    http://www.microsoft.com/en-us/microsoftservices/support.aspx

    Please "Accept as Answer" if it helped, which might be beneficial to other community members reading this thread. Thanks for your cooperation!

    0 comments No comments

  4. Rangesh Gupta 96 Reputation points
    2021-07-12T06:32:51.323+00:00

    Hello @Leila Kong ,

    Windows 2016 is supported, if you click on Show all operating system you can see windows 2016 option.

    113619-image.png

    0 comments No comments