Opened 4 years ago

Closed 3 years ago

#4232 closed defect (fixed)

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

Reported by: umansky Owned by: rogerdpack
Priority: normal Component: avdevice
Version: git-master Keywords: gdigrab
Cc: rogerdpack@gmail.com Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

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 4 years ago.
Full ffmpeg report output from the command.

Download all attachments as: .zip

Change History (7)

Changed 4 years ago by umansky

Full ffmpeg report output from the command.

comment:1 Changed 4 years ago by umansky

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 Changed 4 years ago by Cigaes

Why do you talk about percentages and DPI setting together?

comment:3 Changed 4 years ago by umansky

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.

http://i.imgur.com/NMamaNW.png

comment:4 Changed 3 years ago by rogerdpack

  • Cc rogerdpack@gmail.com added
  • Owner set to rogerdpack
  • Status changed from new to open

comment:5 Changed 3 years ago by cehoyos

  • Component changed from ffmpeg to avdevice
  • Keywords desktop removed
  • Version changed from unspecified to git-master

comment:6 Changed 3 years ago by rogerdpack

  • Resolution set to fixed
  • Status changed from open to closed

OK hopefully fixed in https://github.com/FFmpeg/FFmpeg/commit/e82883aa88bfccf2669e914eab9deef6cecfd0db please report back and reopen if not.

Note: See TracTickets for help on using tickets.