Opened 9 years ago

Closed 9 years ago

#4232 closed defect (fixed)

gdigrab does not get correct monitor resolution on hidpi device when grabbing desktop

Reported by: umansky Owned by: Roger Pack
Priority: normal Component: avdevice
Version: git-master Keywords: gdigrab
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Summary of the bug: On a hidpi device such as a touchscreen tablet, running Windows 7, attempting to grab the desktop when the DPI setting is set to a number higher than 100% in Control Panel\Appearance and Personalization\Display results in a cropped video and does not grab the entire desktop.

If I set the DPI setting back to 100%, gdigrab correctly gets the right resolution, but this is undesierable as text is practically impossible to read.

How to reproduce:

% ffmpeg.exe -f gdigrab -i desktop video.mp4 -report
ffmpeg version N-68881-ga79ac73 Copyright (c) 2000-2015 the FFmpeg developers
  built on Jan  5 2015 22:02:22 with gcc 4.9.2 (GCC)

This reports the resolution of the tablet as 1280x800, when the actual resolution of the screen is 1920x1200.

If I give it the -video_size flag to be the actual resolution of the monitor, it says I've gone out of bounds.

Attachments (1)

ffmpeg-20150107-151248.log (25.1 KB ) - added by umansky 9 years ago.
Full ffmpeg report output from the command.

Download all attachments as: .zip

Change History (7)

by umansky, 9 years ago

Attachment: ffmpeg-20150107-151248.log added

Full ffmpeg report output from the command.

comment:1 by umansky, 9 years ago

Also, just as an extra bit of info, 150% of 1280 is 1920, which points directly to this being related to the DPI setting.

comment:2 by Cigaes, 9 years ago

Why do you talk about percentages and DPI setting together?

comment:3 by umansky, 9 years ago

This is the setting that fixes/breaks gdigrab on the hidpi device. At 100%, it works, at higher values (the tablet where I'm having the issue is on 150% by default) it reports an incorrect resolution.

comment:4 by Roger Pack, 9 years ago

Cc: added
Owner: set to Roger Pack
Status: newopen

comment:5 by Carl Eugen Hoyos, 9 years ago

Component: ffmpegavdevice
Keywords: desktop removed
Version: unspecifiedgit-master

comment:6 by Roger Pack, 9 years ago

Resolution: fixed
Status: openclosed

OK hopefully fixed in please report back and reopen if not.

Note: See TracTickets for help on using tickets.