summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2019-03-23 16:18:49 +0000
committerMark Thompson <sw@jkqxz.net>2019-06-02 17:30:41 +0100
commit963c4f85fe547ef51fafb66d7eceb3f5637d3843 (patch)
tree12d6ddb1113077cc3a3df20382c7bc97dc6ae877 /doc
parentf1b359aaf5c34359df8c8541d002f128d868f27f (diff)
downloadffmpeg-963c4f85fe547ef51fafb66d7eceb3f5637d3843.tar.gz
doc/indevs: Add example using cropping to capture part of a plane
Diffstat (limited to 'doc')
-rw-r--r--doc/indevs.texi8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/indevs.texi b/doc/indevs.texi
index 1d5ed65773..89ba4fb406 100644
--- a/doc/indevs.texi
+++ b/doc/indevs.texi
@@ -910,6 +910,14 @@ Capture from CRTC ID 42 at 60fps, map the result to VAAPI, convert to NV12 and e
ffmpeg -crtc_id 42 -framerate 60 -f kmsgrab -i - -vf 'hwmap=derive_device=vaapi,scale_vaapi=w=1920:h=1080:format=nv12' -c:v h264_vaapi output.mp4
@end example
+@item
+To capture only part of a plane the output can be cropped - this can be used to capture
+a single window, as long as it has a known absolute position and size. For example, to
+capture and encode the middle quarter of a 1920x1080 plane:
+@example
+ffmpeg -f kmsgrab -i - -vf 'hwmap=derive_device=vaapi,crop=960:540:480:270,scale_vaapi=960:540:nv12' -c:v h264_vaapi output.mp4
+@end example
+
@end itemize
@section lavfi