diff options
author | Timo Rothenpieler <timo@rothenpieler.org> | 2022-07-08 18:02:40 +0200 |
---|---|---|
committer | Timo Rothenpieler <timo@rothenpieler.org> | 2022-07-18 02:08:27 +0200 |
commit | f611255480b7cb61af745131251a1fd72f4dd086 (patch) | |
tree | 78663267da664062a95f95490af4965cac4aa908 /doc | |
parent | 2f0d45571b5290f2cc7269cc74bfb5af139eff3e (diff) | |
download | ffmpeg-f611255480b7cb61af745131251a1fd72f4dd086.tar.gz |
avfilter: add vsrc_ddagrab
Diffstat (limited to 'doc')
-rw-r--r-- | doc/filters.texi | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/doc/filters.texi b/doc/filters.texi index 40f21fb34c..a3604da40d 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -26435,6 +26435,74 @@ need for a nullsrc video source. @end itemize +@section ddagrab + +Captures the Windows Desktop via Desktop Duplication API. + +The filter exclusively returns D3D11 Hardware Frames, for on-gpu encoding +or processing. So an explicit @ref{hwdownload} is needed for any kind of +software processing. + +It accepts the following options: + +@table @option +@item output_idx +DXGI Output Index to capture. + +Usually corresponds to the index Windows has given the screen minus one, +so it's starting at 0. + +Defaults to output 0. + +@item draw_mouse +Whether to draw the mouse cursor. + +Defaults to true. + +Only affects hardware cursors. If a game or application renders its own cursor, +it'll always be captured. + +@item framerate +Framerate at which the desktop will be captured. + +Defaults to 30 FPS. + +@item video_size +Specify the size of the captured video. + +Defaults to the full size of the screen. + +Cropped from the bottom/right if smaller than screen size. + +@item offset_x +Horizontal offset of the captured video. + +@item offset_y +Vertical offset of the captured video. + +@end table + +@subsection Examples + +Capture primary screen and encode using nvenc: +@example +ffmpeg -f lavfi -i ddagrab -c:v h264_nvenc -cq 18 output.mp4 +@end example + +You can also skip the lavfi device and directly use the filter. +Also demonstrates downloading the frame and encoding with libx264. +Explicit output format specification is required in this case: +@example +ffmpeg -filter_complex ddagrab=output_idx=1:framerate=60,hwdownload,format=bgra -c:v libx264 -crf 18 output.mp4 +@end example + +If you want to capture only a subsection of the desktop, this can be achieved +by specifying a smaller size and its offsets into the screen: +@example +ddagrab=video_size=800x600:offset_x=100:offset_y=100 +@end example + + @section gradients Generate several gradients. |