Changes between Version 32 and Version 33 of Capture/Desktop


Ignore:
Timestamp:
Sep 14, 2025, 3:01:49 PM (13 months ago)
Author:
Timo R.
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Capture/Desktop

    v32 v33  
    22#!html
    33<h1 style="font-size: 22px;">
    4 Capturing your Desktop / Screen Recording
     4Capturing Your Desktop / Screen Recording
    55</h1>
    66}}}
    … …  
    5656
    5757= Windows =
     58
     59== Win10+ WinRT/UWP based Windows.Graphics.Capture ==
     60
     61This filter uses the most recent API Microsoft added for capturing individual windows, but also entire monitors.
     62It grabs the frames directly from the compositor, which allows it to capture windows that are partially or fully occluded.
     63
     64{{{
     65ffmpeg -filter_complex gfxcapture=window_title='(?i)My Application':max_framerate=60,hwdownload,format=bgra,format=yuv420p -c:v libx264 -crf 15 capture.mp4
     66}}}
     67
     68Since it outputs d3d11 hardware frames, you need to either download them like shown above, or pass them directly to a compatible hardware encoder, like nvenc or amf.
     69
     70{{{
     71ffmpeg -filter_complex gfxcapture=monitor_idx=1:width=1920:height=1080:resize_mode=scale_aspect:output_fmt=10bit -c:v hevc_nvenc -cq 15 capture.mp4
     72}}}
     73
     74This filter returns frames at the rate they come in from the native API, with timestamps directly from the compositor.
     75As a result of this, it produces highly variable frame rate (VFR) output, which in extreme cases can be 0 FPS for extended periods of time.
     76If you need a stable frame rate, add an FPS filter after it:
     77
     78{{{
     79ffmpeg -filter_complex gfxcapture=window_exe='^firefox.exe$':display_border=1:scale_mode=point:max_framerate=60,fps=60 -rc qvbr -qvbr_quality_level 15 -c:v h264_amf capture.mp4
     80}}}
     81
     82For a full list of options, check the documentation of the gfxcapture filter: [https://ffmpeg.org/ffmpeg-filters.html#gfxcapture]
    5883
    5984== Use DirectShow ==