Opened 3 years ago

Last modified 14 months ago

#9413 new enhancement

Feature request: WindowsGraphicsCapture API

Reported by: MB SOFT Owned by:
Priority: wish Component: avdevice
Version: git-master Keywords: gdigrab
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by MB SOFT)

This is a feature request.

Could you please modify Gdigrab to use WindowsGraphicsCapture API?

https://blogs.windows.com/windowsdeveloper/2019/09/16/new-ways-to-do-screen-capture/

Advantages:
1) capture any window (including hardware accelerated window)
2) capture any graphics in the window (including transparent childs)
3) capture window outside the visible area
4) minimal cpu load even with high res and rates

Ex: here [​https://github.com/mmozeiko/wcap] there are free sources of the tool wcap that use windows graphics capture api. compared to gdigrab it has 3 times less cpu load.
Could someone use that code and adapt gdigrab?

[​https://github.com/mmozeiko/wcap/blob/main/wcap_capture.c]

Change History (12)

comment:1 by MB SOFT, 3 years ago

Description: modified (diff)

comment:2 by MB SOFT, 3 years ago

Description: modified (diff)

comment:3 by Balling, 3 years ago

NVFBC is better, much better. And is available on geforce too with a simple hack. P.S. it works by this day in Steam capture and shadowplay, last one records in hevc now.

Last edited 3 years ago by Balling (previous) (diff)

comment:4 by markg85, 2 years ago

For the windows side of things, a change here might be required.
Nvidia themselves have deprecated NVFBC on windows specifically (see this pdf: https://developer.download.nvidia.com/designworks/capture-sdk/docs/NVFBC_Win10_Deprecation_Tech_Bulletin.pdf)

The support remains as-is on other platforms.

comment:5 by Balling, 2 years ago

Nvidia themselves have deprecated NVFBC on windows specifically

After it was hacked. It is still used in Steam and Geforce Capture. Looking glass has a patch that uses magic string from Gefore Capture.

Last edited 2 years ago by Balling (previous) (diff)

comment:6 by MB SOFT, 2 years ago

OBS Studio and VMIX they both offers WindowsGraphicsCapture API mode and works very well.
It's missing in ffmpeg

comment:7 by MB SOFT, 2 years ago

here https://github.com/mmozeiko/wcap there are free sources of the tool wcap that use windows graphics capture api. compared to gdigrab it has 3 times less cpu load and allows the capture of windows outside the screen area or with transparent childs or with d3d11 surfaces.
Could someone use that code and create an input module for ffmpeg to use instead of the old and heavy gdigrab?

https://github.com/mmozeiko/wcap/blob/main/wcap_capture.c

Last edited 2 years ago by MB SOFT (previous) (diff)

comment:8 by MB SOFT, 20 months ago

Component: ffmpegavdevice
Keywords: gdigrab added; WindowsGraphicsCapture API removed

comment:9 by Carl Eugen Hoyos, 20 months ago

Priority: normalwish
Version: unspecifiedgit-master

comment:11 by MB SOFT, 20 months ago

Description: modified (diff)

comment:12 by MB SOFT, 14 months ago

gstreamer 1.22 now has windows graphics capture api

"d3d11screencapture: Add Windows Graphics Capture API based capture mode, including Win32 application window capturing"

with that i can now capture a single application form

even the upcoming ddgrab cannot do that

i have now switched to gstreamer but hope to see windows graphics capture added soon also on ffmpeg and come back.

Note: See TracTickets for help on using tickets.