Opened 15 months ago

Last modified 3 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 (11)

comment:1 by MB SOFT, 15 months ago

Description: modified (diff)

comment:2 by MB SOFT, 15 months ago

Description: modified (diff)

comment:3 by Balling, 15 months 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 15 months ago by Balling (previous) (diff)

comment:4 by markg85, 13 months 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, 13 months 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 13 months ago by Balling (previous) (diff)

comment:6 by MB SOFT, 13 months 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, 10 months 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 10 months ago by MB SOFT (previous) (diff)

comment:8 by MB SOFT, 3 months ago

Component: ffmpegavdevice
Keywords: gdigrab added; WindowsGraphicsCapture API removed

comment:9 by Carl Eugen Hoyos, 3 months ago

Priority: normalwish
Version: unspecifiedgit-master

comment:11 by MB SOFT, 3 months ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.