[FFmpeg-devel,v4,2/7] doc/indevs: Add example using cropping to capture part of a plane

Submitted by Mark Thompson on April 9, 2019, 10:07 p.m.

Details

Message ID 20190409220730.29311-2-sw@jkqxz.net
State New
Headers show

Commit Message

Mark Thompson April 9, 2019, 10:07 p.m.
---
 doc/indevs.texi | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Ruiling Song April 15, 2019, 3:35 a.m.
> -----Original Message-----

> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf Of

> Mark Thompson

> Sent: Wednesday, April 10, 2019 6:07 AM

> To: ffmpeg-devel@ffmpeg.org

> Subject: [FFmpeg-devel] [PATCH v4 2/7] doc/indevs: Add example using cropping

> to capture part of a plane

> 

> ---

>  doc/indevs.texi | 8 ++++++++

>  1 file changed, 8 insertions(+)

> 

> diff --git a/doc/indevs.texi b/doc/indevs.texi

> index 1d5ed65773..a4f0f608d7 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.  For example, to

					         absolute position and window size?
> 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

> --

> 2.20.1

> 

> _______________________________________________

> ffmpeg-devel mailing list

> ffmpeg-devel@ffmpeg.org

> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

> 

> To unsubscribe, visit link above, or email

> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

Patch hide | download patch | download mbox

diff --git a/doc/indevs.texi b/doc/indevs.texi
index 1d5ed65773..a4f0f608d7 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.  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