Opened 3 years ago

Last modified 2 years ago

#9424 new defect

gdigrab input device does not properly scale the screen after display resolution change

Reported by: Mykola Mokhnach Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: gdigrab
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by Mykola Mokhnach)

OS: Windows 10

How to reproduce:

  1. Set display resolution to AxB
  2. Start ffmpeg screen recording with the below command
  3. Change the display resolution to CxD, which is higher than AxB
  4. Stop recording the video and watch it

Actual result:
In the recorded video the actual display content is cut off to the initial resolution value

Expected result:
The recorded video should properly fit/scale/pad the screen content after display resolution change

%ffmpeg.exe -y -f gdigrab -framerate 4 -r 4 -i desktop -filter_complex "[0:v]split=2[ts][capture];[ts]setpts=time(0)*FR[ts];[capture]scale=1280:960:force_original_aspect_ratio=decrease:eval=frame,pad=1280:960:-1:-1:color=black[capture]" -map "[ts]" -vsync 0 -flush_packets 1 -f mkvtimestamp_v2 output_ts.txt -map "[capture]" -c:v libx264 -tune zerolatency -preset veryfast -fflags nobuffer -pix_fmt yuv420p -movflags +faststart -f mp4 output.mp4

ffmpeg version 2021-09-11-git-3e127b595a-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10.3.0 (Rev5, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      57.  5.100 / 57.  5.100
  libavcodec     59.  7.103 / 59.  7.103
  libavformat    59.  5.100 / 59.  5.100
  libavdevice    59.  0.101 / 59.  0.101
  libavfilter     8.  9.100 /  8.  9.100
  libswscale      6.  1.100 /  6.  1.100
  libswresample   4.  0.100 /  4.  0.100
  libpostproc    56.  0.100 / 56.  0.100
Hyper fast Audio and Video encoder

Change History (2)

comment:1 by Mykola Mokhnach, 3 years ago

Description: modified (diff)

comment:2 by Carl Eugen Hoyos, 2 years ago

Keywords: gdigrab added
Note: See TracTickets for help on using tickets.