gdigrab is not dpi-aware
|Reported by:||Christoph Rackwitz||Owned by:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
gdigrab on win8.1 and a dpi-scaled screen will capture a cropped desktop, exactly as much as implied by the dpi scaling factor. on win7, the whole screen is captured.
How to reproduce:
- use windows 8.1+ (something that does transparent dpi scaling to unaware programs and fakes system parameters)
ffmpeg -f gdigrab -framerate 15 -i desktop -c:v qtrle out.mov
I'm using an ffmpeg zeranoe build from december 2014.
someone on the internet suggested calling SetProcessDPIAware() (before any win32 graphics code). https://msdn.microsoft.com/en-us/library/windows/desktop/ms633543%28v=vs.85%29.aspx
a manifest file might be better (see 'race condition' in the previous link). https://msdn.microsoft.com/en-us/library/windows/desktop/ff684173(v=vs.85).aspx
there's also SetProcessDpiAwareness() https://msdn.microsoft.com/en-us/library/windows/desktop/dn302122(v=vs.85).aspx as found on https://msdn.microsoft.com/en-us/library/windows/desktop/dd464659(v=vs.85).aspx
GetDeviceCaps(source_hdc, HORZRES) (or other indices) might alternatively report correct values, or they might not.