[FFmpeg-trac] #4505(avdevice:new): gdigrab is not dpi-aware

FFmpeg trac at avcodec.org
Wed Apr 22 13:47:11 CEST 2015


#4505: gdigrab is not dpi-aware
-------------------------------------+-------------------------------------
             Reporter:  cracki       |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  avdevice     |                  Version:
             Keywords:               |  unspecified
  gdigrab,windows                    |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 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.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/4505>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list