Opened 18 months ago
#10385 new defect
ddagrab fails on Windows if adapter ID is specified
Reported by: | Jøger Hansegård | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | 6.0 | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
Screen capturing on Windows with ddagrab fails if adapter id is specified on non-UWP build. Root cause is likely that CreateDXGIFactory is used, not CreateDXGIFactory1. Desktop duplication API appears to be incompatible with DXGI factories prior to 1.1.
See also https://learn.microsoft.com/en-us/windows/win32/api/dxgi1_2/nf-dxgi1_2-idxgioutput1-duplicateoutput which specifies that IDXGIOutput1::DuplicateOutput fails with E_INVALIDARG if the device was not created from IDXGIFactory1 (or a later version of a DXGI factory interface that inherits from IDXGIFactory1).
How to reproduce:
ffmpeg -init_hw_device d3d11va:0 -filter_complex ddagrab -c:v h264_nvenc -cq:v 20 output.mkv -loglevel debug ffmpeg version 6.0 built on Windows, MSYS2